g_value_transform() is locale-dependent

Phil Longstaff plongstaff at rogers.com
Sun Aug 3 12:50:03 EDT 2008

Andreas Köhler wrote:
> Hi Phil,
> unfortunately, g_value_transform() inside gnc_sql_get_sql_value() does
> not work for me.  When you start gnucash within LANG=de_DE.UTF-8, you
> will see that transforming 0.000 yields "0,000" and makes the sql code
> stream out loud.
> Altogether, quoting the documentation of that function
> """Especially transformations into strings might reveal seemingly
> arbitrary results and shouldn't be relied upon for production code."""
> I wonder whether we can without it.  Please note that I have no clue
> whether it is used on values only that are supposed to be string-like
> anyway or it is just filling a gap of implementation somewhere else :-)
> Anyway, thanks!
> Ciao,
> -- andi5

OK.  I use it to try to get a string version of a GValue.  For strings,
no problem.  For ints, doubles, ... I use it for the conversion.  I'll
find some other way.

Thanks for finding this.


More information about the gnucash-devel mailing list