[Printing-architecture] [Gimp-print-devel] Common Printing Dialog: PPD extension specs updated

Till Kamppeter till.kamppeter at gmail.com
Mon Aug 4 14:08:00 PDT 2008


Roger Leigh wrote:
> 
> If anyone could test using the program I posted, that would be very
> helpful.  Testing on other BSD, Solaris, UNIX and Linux systems would
> be great.  I'm using glibc-2.7/gettext-0.17.
> 
> http://nagini.vm.bytemark.co.uk/~rleigh/gettext-test.c
> http://nagini.vm.bytemark.co.uk/~rleigh/gutenprint.mo
> 
> You'll need to
> - save gutenprint.mo as <foo>/de_GB/LC_MESSAGES/gutenprint.mo
> - set localedir to <foo> in gettext-test.c
> - set _GNU_SOURCE to _BSD_SOURCE in gettext-test.c (or whatever needs
>   doing to get setenv() prototyped on BSD)
> 
> Build with "gcc -std=c99 -o gettext-test gettext-test.c
> Run ./gettext-test
> 
> You should see something similar to:
> 
> % ./gettext-test
> setlocale1: en_GB.ISO-8859-1
> setlocale2: (null)
> setlocale3: en_GB.ISO-8859-1
> domain: /usr/share/locale
> codset (null)->UTF-8
> selected-domain: gutenprint
> lookup: Foto aus fünf Farben gemischt
> dlookup: Foto aus fünf Farben gemischt
> 
> To make the test most realistic, start by setting a non-UTF-8-locale
> such as en_GB.ISO-8859-1 (any locale except C that is not UTF-8 is
> good).  This tests correct recoding into UTF-8.  This is also why we
> are using an ISO-8859-1 message catalogue.  Above we see correct UTF-8
> output for a catalogue without a valid system locale, which is the
> objective.

I did the test again, but this time with strace. I did:

wget http://nagini.vm.bytemark.co.uk/~rleigh/gettext-test.c
wget http://nagini.vm.bytemark.co.uk/~rleigh/gutenprint.mo
mkdir -p x/de_GB/LC_MESSAGES/
mv gutenprint.mo x/de_GB/LC_MESSAGES/
<edit gettext-test.c to set the localedir>
gcc -std=c99 -o gettext-test gettext-test.c
strace -s 1024 -o st.out ./gettext-test

Screen output:

setlocale1: (null)
setlocale2: (null)
setlocale3: C
domain: /home/till/gutenprint/cvs/HEAD/x
codset (null)->UTF-8
selected-domain: gutenprint
lookup: Five Color Photo Composite
dlookup: Five Color Photo Composite
till at till-laptop:~/gutenprint/cvs/HEAD$ less st.out

The file st.out is attached. What one can see in the file is that the 
gutenprint.mo is not touched by the program, not even the x/ directory.

    Till

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: st.out
Url: http://lists.linux-foundation.org/pipermail/printing-architecture/attachments/20080804/d36b4d29/attachment-0001.txt 


More information about the Printing-architecture mailing list