Reputation: 10828
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
Upvotes: 4
Views: 1715
Reputation: 54634
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.
Upvotes: 0
Reputation: 799210
Both libiconv and icu can do this.
Upvotes: 2