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:14:32PM +0200, Martin Husemann wrote:
> On Mon, Aug 05, 2019 at 02:37:15PM +0200, Joerg Sonnenberger wrote:
> > The problem is that the locale facet is specified to return a single
> > char_t and not a string or array. That's why cout can't print anything
> > reasonable here.
> 
> Heh, useless.
> 
> So the easy solution is to use 
> 
> 	cout << nl_langinfo(THOUSEP) 
> 
> ?

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.

Joerg


Home | Main Index | Thread Index | Old Index