[vlc-devel] Add a us_strtof function to avoid problem	with	comma and point in	equalizer
    Rémi Denis-Courmont 
    rem at videolan.org
       
    Thu Apr 16 15:20:14 CEST 2009
    
    
  
Le jeudi 16 avril 2009, Cyril MATHE a écrit :
> In the QT interface values in strings are saved and read with point
> although my computer is not using US format. Default option in VLC is
> to read save float value in string with point,
VLC always saves *float* settings with the US decimal separator.
But the equalizer band setting is *not* a float setting. It's a 
character *string*.
> but when using moz-plugin, firefox seems to change this option
Both Firefox and VLC configure LC_NUMERIC according to the user 
configured locale. There is no difference between either of them.
In other words, atof(), strtof(), scanf("%f") and the likes expect a 
comma inside Firefox processes as well as inside VLC processes.
> and so I have a problem to read those string coming from VLC. Actually
> in moz-plugin strtof is looking for a coma not a point, and this is to
> avoid this problem that I need us_strtof.
As far as I can tell, at the moment, the problem is _not_ with Firefox. 
The problem is with the Qt UI, which is not formatting float numbers 
properly.
Nevertheless, I don't mind changing the equalizer string convention to 
always use US format rather than locale format. But then, you need to 
fix your patch because it currently breaks with !HAVE_STRTOF.
-- 
Rémi Denis-Courmont
http://www.remlab.net/
    
    
More information about the vlc-devel
mailing list