Glib::ustring's operator<< doing a conversion to locale, why?



I found that Glib::ustring::operator<<() does a locale-from-utf8 conversion, always, and all the time. This totally, erm, avoiding foul language, spoils up usage of e.g. boost::format properly, if i want to have the UTF8-ness preserved.

Using .c_str() or .raw() will avoid this problem, but this is hardly a solution (now i'd have to audit _all_ of our code). Adding to this comes that an ostream will probably perform a conversion to whatever locale it's imbued with anyway, so why this conversion there?

It seems to be just simply and plain flawed to me, unless i'm totally wrong, in which case i'd be glad to accept a justification of the issue.

-- Milosz
"'Cause if an actor acts in the forest and there's nobody there to see him...... Or something like that." -- Terry O'Ryan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]