7 Jun
2014
7 Jun
'14
7:13 a.m.
Andrew Marlow wrote:
I hope this is the right place to post my question. I expected to be able to convert between narrow and wide strings using boost lexical cast but it fails to compile.
<snip>
Have you checked Boost.Locale? E.g.
http://www.boost.org/doc/libs/1_55_0/libs/locale/doc/html/charset_handling.h... This seems from / to utf stuff. But there seems no ansi (i.e. 1 byte fixed length with the ascii set) to ucs-16 (fixed 2 byte) conversion. Both character encodings cannot cover all code points, but are very common on windows platforms due to historical reasons.