What does it take to specialize basic_i/ostream?

Pages: 12
Actually I do have codevt, but not codecvt_utf8_utf16 or anything like that, or wbuffer_convert
Available on the Microsoft (2012) and clang's libc++.

Not available on GNU g++ which has hard-coded far too many linuxisms.

Either use Microsoft C++ or clang with libc++.

Or if your g++ implementation supports it (for example on FreeBSD), replace GNU's libstdc++ with libc++
with -stdlib=libc++
No, I don't want conversion, I dno't want locales, just regular char16_t intput and output! Output works, but input doesn't! I asked you many times why, and you only gave me this conversion buffer and locales. WHY DOES IT DO A DYNAMIC_CAST IN CIN>>?
> I don't want conversion ... just regular char16_t intput and output!

How do you expect to read utf-16 from stdin (which is typically either utf-8 or OEM depending on the platform) without doing any kind of translation?

Presumably you are on windows; in the absence of a conforming standard C++ library, you could use _setmode() on the stdin/stdout fd with _O_U16TEXT to get the required translation infrastructure in place http://msdn.microsoft.com/en-us/library/tw4k6df8(v=vs.101).aspx

and then, attach the fd to a C++ stream.
http://www.boost.org/doc/libs/1_50_0/libs/iostreams/doc/classes/file_descriptor.html


> Output works ..

Does it? Even when the character set is not ISO-8859-1?
Topic archived. No new replies allowed.
Pages: 12