[vlc-devel] Problem in the equalizer with strtof

Rémi Denis-Courmont rem at videolan.org
Tue Apr 14 13:29:07 CEST 2009


Le mardi 14 avril 2009, Cyril MATHE a écrit :
> There is no problem in the main VLC, the problem appears when i
> launch the mozilla plugin in firefox. I am using firefox in French
> mode and I think that firefox change the LC_NUMERIC value. three
> reasons of that :

The main VLC is setting LC_NUMERIC to the locale value. In fact, it's 
setting LC_ALL in bin/vlc.c

> 1) I launch Firefox in French mode when I ask for the current value I
> have :
> "0 0 12 0 9 6 -5 2 -12 0" instead of  "0.0 12.0 9.6 -5.2 -12.0 5.6
> -8.0 9.6 3.4 5.2", the plugin consider the decimal part as an
> equalizer band.
>
> 2) I launch Firefox in English mode and i have the good values
>
> 3) I made a change in VLC to have comma as decimal separator, I
> launch Firefox in French mode and I have the correct values.
>
> I noticed this problem and I really don't know how to deal with this
> decimal separator problem. One solution could be  to put integer
> values instead of float values (i tried it, it works) but the problem
> is still existing when you get the values (you get incorrect values).

We have struggled a lot with this in the past. The conclusion was, one 
shall consistently use either the local or the american decimal 
separator, for any given piece of serialized informations. Namely, 
here, you're supposed to always use the local separator.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list