UTF-8 support - char or wchar_t?

Ole Laursen olau@hardworking.dk
Mon Jun 21 23:09:00 GMT 2004


Martin Sebor <sebor@roguewave.com> writes:

[...]

> The most portable way to do this, though, is to forget about codecvt
> and use iconv directly.

Thanks! What you are suggesting is to use a std::wostringstream,
extract a std::wstring with str(), put the data inside a std::string
and use an iconv wrapper to convert from the wchar_t encoding to
UTF-8, right? I'll try that.

-- 
Ole Laursen
http://www.cs.aau.dk/~olau/



More information about the Libstdc++ mailing list