开发者

Does Boost.Locale support reading and writing UTF-8 encoded files?

开发者 https://www.devze.com 2023-03-17 05:06 出处:网络
It is the only reason I was excited about trying out Boost.Locale but there are no file I/O examples on the web site.

It is the only reason I was excited about trying out Boost.Locale but there are no file I/O examples on the web site. I am not sur开发者_JS百科e if it means file I/O is not supported or suppoted but undocumented.

My platform is Windows 7


there is such an example:

std::locale loc= generator().generate("he_IL.UTF-8");
std::wofstream file;
file.imbue(loc);
file.open("hello.txt");
file << L"שלום!" << endl;

Also Boost.Serialize can help to convert to UTF8

0

精彩评论

暂无评论...
验证码 换一张
取 消