GNOME Bugzilla – Bug 125283
Invalid postscript when printing to file
Last modified: 2004-07-05 14:56:23 UTC
Printing to file produces invalid postscript files when user locale is one where decimal separator is not a dot. Please find attached a test.png test file, the resulting postscript files whith fr_FR and C locales, and the diff between these last two. The problem in the ps file obtained with fr_FR locale is decimal separator is comma instead of dot.
Created attachment 20881 [details] Test file
Created attachment 20882 [details] Result with locale set to fr_FR
Created attachment 20883 [details] Result with locale set to C
Created attachment 20884 [details] Diff
Thanks for this well-done bug report. Unfortunately it went to the wrong place. You should report it at the gimp-print bugtracker at sourceforge. Though I fear we might have to find a workaround for this brokeness of libgimpprint in the GIMP plug-in. Can you however please file a bug report against gimp-print ?!
Basically the fix is to use a locale-independent variant of fprintf() such as g_ascii_dtostr() which is provided by GLib. Since we probably don't want to wait for the gimp-print people to fix this, we should find out where exactly in the print plug-in we need to temporarily set LC_NUMERIC to C.
Created attachment 20888 [details] With gimp1.2
I'm not sure its a gimp-print problem, since gimp-1.2 and the same version of gimp-print produce valid postscript files. Please find before an attached ps file obtained with gimp-1.2 with locale set to fr_FR.
You can trust me, I know what I'm talking about. GIMP-1.2 used to set LC_NUMERIC to C for all plug-ins. GIMP-1.3 doesn't do such stupid things any longer.
>You can trust me, I know what I'm talking about. That was just to be sure. I'm going to fill a bug in the gimp-print sourceforge bugtracker.
Seems to be fixed in both development and stable branch of gimp-print. I probably have to wait for the next stable release of gimp-print (4.2.6). Bug number is 729918 in sf bugtracker.
http://sourceforge.net/tracker/?group_id=1537&atid=101537&func=detail&aid=729918
Eeek, what a terrible fix. At least they could have changed LC_NUMERIC only... We still need to decide if we want to point at gimp-print and ask people to update to the 4.2.6 release or if we want to introduce a workaround in the GIMP plug-in.
If we decide against the workaround, this report should be closed as duplicate of bug #111746.
This should be figured out before 2.0.
Gimp-Print 4.2.6 has just been released. We could ask people that experience problems to update. I haven't verified yet that this release fixes the problem but it's supposed to.
Slowly gimp-print 4.2.6 seems to appear on various distributions. Would it be worthwhile to depend on it?
The following change takes care of it. We can add a hard dependency on 4.2.6 later: 2004-02-10 Sven Neumann <sven@gimp.org> * configure.in: warn when gimpprint is older than version 4.2.6. It's probably too late to introduce a dependency on that version but we would like people to update in order to avoid bug #125283.
*** Bug 135475 has been marked as a duplicate of this bug. ***
*** Bug 141882 has been marked as a duplicate of this bug. ***
*** Bug 145457 has been marked as a duplicate of this bug. ***