开发者

How to convert UTF-8 <-> UTF16 portable

is there a simple, portable开发者_运维百科 way (win32, linux at least) to convert UTF-16 to UTF-8 and back? Preferably using boost.

Thx for your help, Tobias


Both libiconv and icu can do this.


Well, if this is for academic purposes, you can convert to UTF-32 and then to UTF-8 or UTF-16. Unicode.org has a convenient PDF that contains a table of bit distributions for UTF-32, UTF-16, and UTF-8.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜