简体   繁体   中英

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

libiconvicu都可以做到这一点。

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM