wfstream::get() function and multibyte encoding
Paolo Carlini
pcarlini@suse.de
Wed Jun 23 11:12:00 GMT 2004
Joseph D. Wagner wrote:
>Ok, I think I've figured it out. Documentation about this part of C++ is sparse.
>
>
Yes, you are right: the problem is also that much of this is not
mandated by the Standard
(see also the recent messages from Nathan and Benjamin)...
>So is there a codecvt or locale for UTF-16 or do I need to create one?
>
>
Well, frankly, I can't find one: this is expected since all those
encodings are really meant as
*internal* encodings (beware that the standard internal encoding on GNU
system is 4
bytes). I don't know if you already have this very nice doc:
http://www.cl.cam.ac.uk/~mgk25/unicode.html
Anyway, preparing a suited codecvt facet seems easy (it would just pack
bytes of the internal
representation to an appropriate endianness): grep in our testsuite for
'public std::codecvt' for
many examples...
Paolo.
More information about the Libstdc++
mailing list