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 /de_GB/LC_MESSAGES/gutenprint.mo > - set localedir to 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/ 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@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