ICU C++ Converting Encodings
问题 As I understand it, different locales have different encodings. With ICU I'd like to convert from a UnicodeString to the current locale's encoding, and back. Specifically I'm using Boost's Filesystem library, which in turn uses either Windows' UTF-16, or Linux's UTF-8 encodings. Is there a way to reliably do this using ICU, or another library? 回答1: You can use ICU, but you may find iconv() sufficient, which is a lot simpler to set up and operate (and it's part of Posix, and easily available