[MPlayer-dev-eng] [PATCH] Use _NET_WM_NAME for UTF-8 title in X11 if supported

Rich Felker dalias at aerifal.cx
Thu Jun 22 18:02:37 CEST 2006


On Thu, Jun 22, 2006 at 02:46:21PM +0200, Matthias Hopf wrote:
> On Jun 21, 06 22:50:26 -0400, Rich Felker wrote:
> > > > P.S. It would have been incredibly easy for C to add a flag to the
> > > > printf format specifiers to indicate whether to use a localized format
> > > > or the "C locale" format when printing numbers, but instead they chose
> > > > the incredibly broken and stupid way, making locale essentially
> > > > useless in practice...
> > > 
> > > char *saved = setlocale(LC_NUMERIC, "C");
> > > printf("%f\n", blah);
> > > setlocale(LC_NUMERIC, saved);
> > 
> > Not thread-safe. :) I hate threads but some (many) developers on other
> > projects want them.
> 
> At least glibc and *BSD libcs have xlocale.h, which gives you
> thread-safe locale switching.

"At least"?? Making nasty nonstandard extensions that horribly bloat
the standard library even more is anything but a good thing.
Thankfully no one uses that crap...

The fundamental problem is simply that so many core library routines
depend on locale when they shouldn't. If this were fixed then the
issue would mostly go away.

> I know, this is not standardized in any way. But at least glibc and BSD
> look similar.

This makes it even worse; people are more likely to use crap when 2
implementations have it than when just one does..

Rich




More information about the MPlayer-dev-eng mailing list