This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: UTF-8 support - char or wchar_t?


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]