[gs-devel] Re: [Gimp-print-devel] GIMP-Print IJS driver and paper sizes

Robert L Krawitz rlk at alum.mit.edu
Wed Aug 7 04:04:15 PDT 2002


   Cc: till.kamppeter at gmx.net, gimp-print-devel at sourceforge.net
   From: Michael Natterer <mitch at gimp.org>
   Date: 07 Aug 2002 12:57:30 +0200

   Robert L Krawitz <rlk at alum.mit.edu> writes:

   >    Date: Tue, 06 Aug 2002 21:07:22 +0200
   >    From: Till Kamppeter <till.kamppeter at gmx.net>
   > 
   >    Now it seems that I have fixed it. I have done the changes as shown
   >    in the attached patch, so that exactly the relevant string <->
   >    float commands are enclosed by the "setlocale" calls. This way all
   >    translatable error messages will still come out correctly
   >    translated. I have tested it on the Epson Stylus C70 and the Epson
   >    Stylus Photo 790 on a machine with french locale and the pages come
   >    out in the correct size now.
   > 
   > This fix just feels all wrong to me.  I don't like the idea of
   > fiddling with the locale for this purpose; it just feels like a hack.
   > 
   >    I have already commited the changes on the src/ghost/ijsgimpprint.c
   >    file to the CVS, both 4.3.x (HEAD) and 4.2.x.
   > 
   > Please back this out until we determine a correct fix.  This may be a
   > bug (or poor design) in IJS.

   Exactly the same problem existed in GIMP.

Ick.

   The (less rude than setting LC_ALL) semi-solution for 1.2 was to set
   LC_NUMERIC to "C".  For GIMP 1.3 the "real" solution is to not use the
   broken libc scanf/printf stuff but glib2's g_ascii_formatd(),
   g_ascii_strtod() and g_ascii_dtostr().

   There is IMHO no was around providing own, locale insensitive
   functions, either from glib2 or copied from there...

In this case, there may be another solution (don't use floating point
numbers), since this is all happening in a tightly controlled
environment.  I'm waiting to hear back from the Ghostscript
developers.



More information about the gs-devel mailing list