
I'm trying the example on the "Character Set Conversions" page of the
Boost.Locale documentation:
http://www.boost.org/doc/libs/1_49_0/libs/locale/doc/html/charset_handling.h...
(the full code I'm running is at the end of this message).
When compiling with gcc:
g++ -o test -lboost_locale test.cpp
It run correctly - it prints "שלום" to standard output.
However, when compiling with clang:
clang++ -o test -lboost_locale test.cpp
It produces, as far as I can tell, gibberish - it prints "ש××" to
standard output. The hex values of the output are:
0xc3 0x97 0xc2 0xa9 0xc3 0x97 0xc2 0x9c 0xc3 0x97 0xc2 0x95 0xc3 0x97 0xc2 0x9d
--------
What I'd like is to have a stream that accepts wide strings in the
current locale and produces narrow strings in UTF-8 - am I completely
off the track? If so, what should I do instead, and if not, what am I
doing wrong?
Thanks!
- Jesse Beder
-------
(code follows)
#include