[vlc-devel] Re: vlc: svn commit r12168 (dionoea)

Rémi Denis-Courmont courmisch at via.ecp.fr
Sat Aug 13 17:31:28 CEST 2005


Le Samedi 13 Août 2005 18:03, Subversion daemon a écrit :
> r12168 | dionoea | 2005-08-13 17:03:21 +0200 (Sat, 13 Aug 2005) | 12
> lines Changed paths:
>    M /trunk/modules/gui/wxwidgets/preferences_widgets.cpp
>    M /trunk/modules/gui/wxwidgets/wxwidgets.cpp
>    M /trunk/src/libvlc.c
>
> Disclaimer : this commit would need to be checked by someone
>
> Change locale (LC_NUMERIC) in appropriate places so we always use the
> user's locale when reading/writting floats to config (otherwise it
> would read floats using C locale (float separator is . in C) and
> write them using the user's local (float separator can be , instead
> of .))

And what's the rationale for NOT using C locale when writing to config ? 
I often change my locale, and I don't want to loose my config!!

> If these changes aren't ok, then i think that the only solution would
> be to always setlocale(LC_NUMERIC, "C") when handling config
> str<->float conversions.

It's probably NOT ok. Most places were I could find float/string 
conversions were debug messages, but they are also to be found in :
 - the RTSP VoD module (which MUST obviously stick to US convention, 
given it's a network protocol),
 - the VLM configuration parsing,
 - maybe, galaktos conf parsing.

Well, probably mostly configuration files/text-based network protocol 
parsing. And these should all have locale-independant float format.

-- 
Rémi Denis-Courmont
http://www.simphalempin.com/home/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20050813/9eb262f9/attachment.sig>


More information about the vlc-devel mailing list