We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
最终输出结果正常,但console中的文件名是乱码
The text was updated successfully, but these errors were encountered:
#59 #59 //通过使用wstring和wcout来实现中日韩字符在Windows的console下正确输出 void sub_process(std::string dir) { std::wstring wdir; wdir.resize(("decode:"+dir).size()); int newSize = MultiByteToWideChar( CP_UTF8, 0, ("decode:"+dir).c_str(), static_cast(("decode:"+dir).length()), const_cast<wchar_t*>(wdir.c_str()), static_cast(wdir.size())); wdir.resize(newSize); std::wcout.imbue(std::locale("chs"));//wcout需要设置为“chs”字符集才能输出正确的字符 std::wcout << wdir << std::endl; std::string outloc(dir);
Sorry, something went wrong.
No branches or pull requests
最终输出结果正常,但console中的文件名是乱码
The text was updated successfully, but these errors were encountered: