UTF-8 support - char or wchar_t?

Paolo Carlini pcarlini@suse.de
Mon Jun 21 15:43:00 GMT 2004


Martin Sebor wrote:

> Paolo Carlini wrote:
> ...
>
>> "codecvt<char, char, mbstate_t> implements a degenerate
>>  conversion; it does not convert at all."
>
> But not necessarily codecvt_byname<char, char, mbstate_t>, which
> is presumably what the test case uses. I think the answer depends
> on what the narrow internal encoding is in the fi_FI.UTF-8 locale.
> If it's, say, ISO-8859-15 then there should be no reason to use
> wchar_t.

Indeed, thanks for the puntualization. However, if we expect the
conversion to happen *automatically* during I/O, then fstream uses
codecvt, not codecvt_byname.

Paolo.



More information about the Libstdc++ mailing list