How to convert UTF-8 & # 8596; UTF16 portable

Is there a simple portable way (win32, linux at least) to convert UTF-16 to UTF-8 and vice versa? It is preferable to use boost.

thanks for your help, Tobias

+4
source share
2 answers

Both libiconv and icu can do this.

+2
source

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 handy PDF that contains a bitmap table for UTF-32, UTF-16, and UTF-8.

0
source

Source: https://habr.com/ru/post/1301669/


All Articles