tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: c++: how to print UTF-8 characters in locale?



On Mon, Aug 05, 2019 at 03:25:20PM +0200, Joerg Sonnenberger wrote:
> That should work, but of course might not give the same result as what
> is used internally. This is a mess and we are not alone in that. E.g.
> I've been told that certain Russian locales have similar problems on
> Linux.

Another option is to use the wchar_t facet to query the separator and
then use the similar clear converter facets from the c++ lib to build a
string<char_t> from it - but I guess that would be like 20 lines of
code that make all perl scripts look very nice.

But for concrete solutions: can we hack the conversion (wherever that
happens) to special case non-breaking-space into simple space when
truncating to char_t?

Martin


Home | Main Index | Thread Index | Old Index