且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将wstring写入希伯来语/阿拉伯语文件的问题

更新时间:2023-02-26 12:56:47

The problem with wofstream is that it accepts the wide string for the open() method but does not actually write wide characters to the file. You have to be explicit about that and imbue() it with a locale that has a codecvt with the encoding you want. Implementation of such a codecvt that produces a UTF encoding is still spotty, here's an example that uses Boost.

相关阅读

技术问答最新文章