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