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

Adam Tlałka atlka at pg.gda.pl
Wed Jun 21 11:55:05 CEST 2006


On Wed, 21 Jun 2006 11:28:55 +0200, Sergey Pinaev <dfo at antex.ru> wrote:

> On Wed, 21 Jun 2006 11:04:02 +0200
> Ivo <ivop at euronet.nl> wrote:
>
>> > I didnt get your point. Thats exactly why LC_NUMERIC exist. If you  
>> want
>> > "same format regardless of locale" - you call setlocale(LC_NUMERIC,  
>> "C");
>> > If you want "printing messages in the user's own cultural  
>> conventions" -
>> > you call setlocale(LC_NUMERIC, ""). (And user that does not like ","  
>> in
>> > place of "." just sets LC_NUMERIC to "C" in his shell profile =/)
>>
>> The problem lies, for example, in parsers that use scanf to read a float
>> value. If the locale enforces a ',' as decimal separator, reading  
>> 1.2:3.4
>> with %f:%f will fail. Setting all sorts of LC_* environment variables is
>> not something most "normal" users know about.
>
> Whats the relation between ``"normal" users'' and "developers"?
> Let me repeat: If you (the developer of parser that use scanf to read a  
> float
> value that ALWAYS have dot as separator) want "same format regardless of
> locale" - you call setlocale(LC_NUMERIC, "C").
> If you dumb enough to not call it - its your problem.

Look at the man page:
	On  startup of the main program, the portable "C" locale is selected as
       default.

So if you just want use only "C" locale you don't need to use setlocale(3)  
at all.

If we talking about mplayer maybe we should check LANG variable to  
determine
wchich language version of messagess to use but it could be specified in  
config file
so maybe it's too much automatization and just not needed feature ;-).

Regards
-- 
Adam Tlałka       mailto:atlka at pg.gda.pl    ^v^ ^v^ ^v^
Computer Center,  Gdańsk University of Technology, Poland
PGP public key:   finger atlka at sunrise.pg.gda.pl



More information about the MPlayer-dev-eng mailing list