OpenLP / ChineseSegmentation

Chinese word segmentation
1 stars 0 forks source link

为什么有的wcout<<L"";中文不会乱码,有的就会乱码? #2

Closed sunlanchang closed 8 years ago

sunlanchang commented 8 years ago

这个就会乱码-> for(int i=0;i<L_freq.word.size();i++) { wcout<<L"频率"<<L_freq.freq[i]; wcout<<L"信息熵"<<xinxishang[i]<<endl; }

这个就不会乱码-> for(int i=0;i<L_freq.word.size();i++) { wcout<<L_freq.word[i]<<L" "<<endl; }

DGideas commented 8 years ago

见https://github.com/OpenLP/ChineseSegmentation/commit/b19f59f247df6b8895ab9a46258382cfcf5ed9fb 中的行注释.

之前用到了一个cout,之后的就全乱码了。已经在这里修改了:https://github.com/OpenLP/ChineseSegmentation/commit/28b57bf8b5b3f40a91b1cf947d6136e674522dcb

DGideas commented 8 years ago

如果没有问题,请关闭这个issue

sunlanchang commented 8 years ago

ok