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

Matthias Hopf mat at mshopf.de
Fri Jun 23 17:15:17 CEST 2006


On Jun 23, 06 11:05:21 -0400, Rich Felker wrote:
> The rationale is to patch up a broken design (C/POSIX locale system),
> and this is done with a whole secondary set of functions that are
> nonportable and thus impossible to use in any serious program. A much
> smarter system would be to abandon the locale system entirely and make
> a (lightweight, not GNU bloatware style) library that's actually able
> to support the needs of international programs (programs that deal
> with datasets and input from more than one nation).

I don't think locale stuff can be done lightweight, too much stuff to be
considered especially for arabian (right-to-left) and eastern (large
charsets, combined characters, multiwidth characters) languages.

I think the POSIX way is pretty good, except for
- being not thread safe
- not being able to easily(!) switch between POSIX/C style and locale
- not having a POSIX/C locale with UTF-8 encoding (this actually works,
  but is not officially supported). Which is basically what all
  programmes will need sometime for writing out configuration / macros /
  ascii based savefiles, so that they work with all locales and still
  can contain strings with non-ASCII characters.

> > need to get offensive, especially as I did not promote this in any form.
> OK. :)

Friends? ;)))

> > > 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.
> > 
> > So *printf shouldn't depend on locale? Which functions should depend on
> > the locale setting then, if not printf?

Perhaps I was inserting too little <sarkasm> tags. In fact, I wanted to
point out that *printf is perhaps the most important routine to be
localized IMHO. You need locale dependent number formating. At least
that is what customers say.

And - yes, I would *love* to have a posix_printf() that would use a
POSIX/C locale, maybe with current characterset encoding.
Well, that could get complicated, as some encodings are not compatible
with ASCII (e.g. Shift-Jis). So it should be POSIX with UTF-8.

Just my 2 cents.

Matthias

-- 
Matthias Hopf <mhopf at suse.de>       __        __   __
Maxfeldstr. 5 / 90409 Nuernberg    (_   | |  (_   |__         mat at mshopf.de
Phone +49-911-74053-715            __)  |_|  __)  |__  labs   www.mshopf.de



More information about the MPlayer-dev-eng mailing list