【发布时间】:2016-03-29 18:09:58
【问题描述】:
std::string arrWords[10];
std::vector<std::string> hElemanlar;
......
this->hElemanlar.push_back(std::string(1, this->arrWords[sayKelime][j]).c_str());
......
我正在做的是:arrWord 的每个元素都是一个 std::string。我得到 arrWord 的第 n 个元素,然后将它们推入 hElemanlar。
假设 arrWords[0] 是“测试”,那么:
this->hElemanlar.push_back("t");
this->hElemanlar.push_back("e");
this->hElemanlar.push_back("s");
this->hElemanlar.push_back("t");
我的问题是虽然我对 arrWords 没有编码问题,但在 hElemanlar 中没有打印或处理好一些 utf-8 字符。 我该如何解决它?s
【问题讨论】:
-
当您的问题陈述只是“某些 utf-8 字符未打印或处理不当”时,我们无能为力
-
我确定“测试”没有问题。你能显示一些确实有问题的字符串吗?
-
@LightnessRacesinOrbit 问题是一些 utf-8 字符没有打印或处理得很好。
-
重复同样的语句也不会增加价值。
-
@BoPersson 喜欢 "ğ,ş,ı,ö,ç,ü"。