Re: [Inkscape-devel] Problem with the GTK file selector in KDE
OK, the difference between the 2004-04-10 05:00 (good) and the 2004-04-10 06:00 (bad) versions are in inkscape.cpp and in main.cpp. Downgrading inkscape.cpp in the 06 tree to the 05 version does not solve the problem, but downgrading main.cpp DOES.
Ok, so it's locale related, I've probed exporting LC_NUMERIC="C" manually and it worked fine. The previous code set that manually to (and it advertised that not doing it will mess up things, btw). Great work Mr. Biro.
Thanks for finding this out. I wonder what functions might be affected by the non-C locale, now that we removed all printfs? Judjing by the program behavior, it fails when reading SVG from files. We don't seem to have scanf() in XML reading code, only atof(). Is atof locale-broken also, as is printf? If so what should we use instead?
Thanks.
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek For a limited time only, get FREE Ground shipping on all orders of $35 or more. Hurry up and shop folks, this offer expires April 30th! http://www.thinkgeek.com/freeshipping/?cpg=12297 _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
_________________________________________________________________ Is your PC infected? Get a FREE online computer virus scan from McAfee� Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
On Tue, 27 Apr 2004, bulia byak wrote:
OK, the difference between the 2004-04-10 05:00 (good) and the 2004-04-10 06:00 (bad) versions are in inkscape.cpp and in main.cpp. Downgrading inkscape.cpp in the 06 tree to the 05 version does not solve the problem, but downgrading main.cpp DOES.
Ok, so it's locale related, I've probed exporting LC_NUMERIC="C" manually and it worked fine. The previous code set that manually to (and it advertised that not doing it will mess up things, btw). Great work Mr. Biro.
Thanks for finding this out. I wonder what functions might be affected by the non-C locale, now that we removed all printfs? Judjing by the program behavior, it fails when reading SVG from files. We don't seem to have scanf() in XML reading code, only atof(). Is atof locale-broken also, as is printf? If so what should we use instead?
http://www.delorie.com/gnu/docs/glibc/libc_424.html
suggests that atof is locale-dependent, but that
"The GNU C library also provides `_l' versions of these functions, which take an additional argument, the locale to use in conversion."
Perhaps that might be a solution?
Cheers Carl
On Tue, 2004-04-27 at 14:49, Carl Hetherington wrote:
"The GNU C library also provides `_l' versions of these functions, which take an additional argument, the locale to use in conversion."
Perhaps that might be a solution?
That sounds like a glibc-specific extension. We'd break compatability with the other Unix platforms (incl. OS X) and Windows if we used it.
We should probably just write our own atof; it's not that hard and we have the opportunity of implementing precisely the grammar required by SVG for reals then.
-mental
participants (3)
-
bulia byak
-
Carl Hetherington
-
MenTaLguY