xfconf-query localization bug

Peter de Ridder peter at xfce.org
Tue May 8 20:18:59 CEST 2012


On Sun, May 6, 2012 at 2:26 PM, Keith Hedger <kdhedger at yahoo.co.uk> wrote:
> Found a small but annoying bug in xfconf-query when using a language that
> uses a comma instead of a decimal point, this gives an error:
>
> LANG=es_ES.utf8 xfconf-query -nRt double -c xfce4-desktop -vp
> /backdrop/screen0/monitor0/saturation -s -2,0
> Imposible convertir "-2,0" al tipo "gdouble".

xfconf-query uses g_ascii_strtod which always uses LANG=C. The
functions which does the string conversion is used for both stored
strings as user input. If you consider this a but, you can report this
as such at http://bugzilla.xfce.org

> This was thrown up in a c program that built a command line via sprintf
> where the float operator ("%f") uses a comma instead of a point.

I don't know the application in which this program is used and if
these are applicable solutions. But you could use a printf alternative
which doesn't use the local output or set LANG=C when executing this
program.

Regards,
Peter


More information about the Xfce mailing list