Unable to convert "14,800000" to number
I get this error when I use the filter effect drop-shaddow using the dx, dy spin-control.
g_ascii_strtod does not convert correctly.
reding src/fixes.cpp it states: /* * until 2004-04-22, g_ascii_strtod could not handle having a locale-based * decimal separator immediately following the number ("5,4" would * parse to "5,4" instead of "5.0" in fr_FR) * * This is the corrected function, lifted from 1.107 gstrfuncs.c in glib */
So the question is: how to convert strtod locale independent?
Adib. ---
The real question here is why g_ascii_strtod is used at all, because it should only be used for numbers pulled from datafiles etc. that are not meant for user consumption. For localized numbers, one should use g_strtod or strtod.
Regards, Krzysztof Kosiński
On Feb 11, 2009, at 4:49 PM, Krzysztof Kosiński wrote:
The real question here is why g_ascii_strtod is used at all, because it should only be used for numbers pulled from datafiles etc. that are not meant for user consumption. For localized numbers, one should use g_strtod or strtod.
And that's the key.
For some uses, Inkscape is operating on SVG numbers which are not localized. For other uses it is operating on user-visible numbers that *are* localized.
So that's why it's used at all.
As to why there's a problem here, it is most likely either a problem of inappropriate copy-n-paste, or of a single bit of code that doesn't realize it needs to operate on both user-input and SVG abstract strings.
Jon A. Cruz wrote:
For some uses, Inkscape is operating on SVG numbers which are not localized. For other uses it is operating on user-visible numbers that *are* localized.
I know that :) I only referred to the fact that an incorrect function is used in this specific case, not that strtod should be used everywhere.
Regards, Krzysztof Kosiński
ok.
I think it comes somewhere where the parameters are exported from the filter dialog. But I did not found the source and where it reads the number from the spin-button and forward to atod-function.
Any hint where I can start?
Thx, Adib. ---
On Fri, Feb 13, 2009 at 1:11 AM, Krzysztof Kosiński <tweenk.pl@...400...> wrote:
Jon A. Cruz wrote:
For some uses, Inkscape is operating on SVG numbers which are not localized. For other uses it is operating on user-visible numbers that *are* localized.
I know that :) I only referred to the fact that an incorrect function is used in this specific case, not that strtod should be used everywhere.
Regards, Krzysztof Kosiński
View this message in context: http://www.nabble.com/Unable-to-convert-%2214%2C800000%22-to-number-tp219451... Sent from the Inkscape - Dev mailing list archive at Nabble.com.
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
participants (3)
-
Jon A. Cruz
-
Krzysztof Kosiński
-
the Adib