All of lore.kernel.org
 help / color / mirror / Atom feed
From: Till Kamppeter <till.kamppeter@gmail.com>
To: Roger Leigh <rleigh@whinlatter.ukfsn.org>
Cc: Robert Krawitz <rlk@alum.mit.edu>,
	printing-architecture@lists.linux-foundation.org,
	printing-japan@lists.linux-foundation.org,
	gimp-print-devel@lists.sourceforge.net, jriddell@ubuntu.com
Subject: Re: [Printing-architecture] [Gimp-print-devel] Common Printing Dialog: PPD extension specs updated
Date: Mon, 04 Aug 2008 23:08:00 +0200	[thread overview]
Message-ID: <48976FB0.5020806@gmail.com> (raw)
In-Reply-To: <87ej57v8gj.fsf@hardknott.home>

[-- Attachment #1: Type: text/plain, Size: 2144 bytes --]

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@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


[-- Attachment #2: st.out --]
[-- Type: text/plain, Size: 6628 bytes --]

execve("./gettext-test", ["./gettext-test"], [/* 23 vars */]) = 0
brk(0)                                  = 0x930d000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb802f000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=122401, ...}) = 0
mmap2(NULL, 122401, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb8011000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340g\1\0004\0\0\0\350\266\25\0\0\0\0\0004\0 \0\n\0(\0D\0C\0\6\0\0\0004\0\0\0004\0\0\0004\0\0\0@\1\0\0@\1\0\0\5\0\0\0\4\0\0\0\3\0\0\0@6\24\0@6\24\0@6\24\0\23\0\0\0\23\0\0\0\4\0\0\0\1\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0ht\25\0ht\25\0\5\0\0\0\0\20\0\0\1\0\0\0\350\201\25\0\350\201\25\0\350\201\25\0\224\'\0\0\210T\0\0\6\0\0\0\0\20\0\0\2\0\0\0\234\235\25\0\234\235\25\0\234\235\25\0\360\0\0\0\360\0\0\0\6\0\0\0\4\0\0\0\4\0\0\0t\1\0\0t\1\0\0t\1\0\0 \0\0\0 \0\0\0\4\0\0\0\4\0\0\0\7\0\0\0\350\201\25\0\350\201\25\0\350\201\25\0\10\0\0\0,\0\0\0\4\0\0\0\4\0\0\0P\345tdT6\24\0T6\24\0T6\24\0\204+\0\0\204+\0\0\4\0\0\0\4\0\0\0Q\345td\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\6\0\0\0\4\0\0\0R\345td\350\201\25\0\350\201\25\0\350\201\25\0\30\36\0\0\30\36\0\0\4\0\0\0\1\0\0\0\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\6\0\0\0\10\0\0\0\363\3\0\0\t\0\0\0\0\2\0\0\16\0\0\0\2400\20D\200 \2\1\214\3\346\220AE\210\0\204\0\10\0A\200\0@\300\200\0\f\2\f\0\0010\0\10@\"\10\246\4\210H6l\240\0260\0&\204\200\216\4\10B$\2\f\246\244\32\6c\310\0\302 \1\300\0R\0!\201\10\4\n  \250\24\0\24(`\0\0P\240\312DB", 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1425800, ...}) = 0
mmap2(NULL, 1431152, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7eb3000
mmap2(0xb800b000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x158) = 0xb800b000
mmap2(0xb800e000, 9840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb800e000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7eb2000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7eb26b0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb800b000, 8192, PROT_READ)   = 0
mprotect(0x8049000, 4096, PROT_READ)    = 0
mprotect(0xb804c000, 4096, PROT_READ)   = 0
munmap(0xb8011000, 122401)              = 0
brk(0)                                  = 0x930d000
brk(0x932e000)                          = 0x932e000
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/locale.alias", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2586, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb802e000
read(3, "# Locale name alias data base.\n# Copyright (C) 1996-2001,2003 Free Software Foundation, Inc.\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2, or (at your option)\n# any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\n# The format of this file is the same as for the corresponding file of\n# the X Window System, which normally can be found in\n#\t/usr/lib/X11/locale/locale.alias\n# A single line contains two fields: an alias and a substitution value.\n# All entr"..., 4096) = 2586
read(3, "", 4096)                       = 0
close(3)                                = 0
munmap(0xb802e000, 4096)                = 0
open("/usr/lib/locale/en_GB.ISO-8859-1/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB.iso88591/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en_GB/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.ISO-8859-1/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en.iso88591/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/en/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_GB.ISO-8859-1/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_GB.iso88591/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en_GB/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.ISO-8859-1/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en.iso88591/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/en/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 1), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb802e000
write(1, "setlocale1: (null)\n", 19)    = 19
open("/usr/lib/locale/de_GB/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/de/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/de_GB/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale-langpack/de/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No such file or directory)
write(1, "setlocale2: (null)\n", 19)    = 19
write(1, "setlocale3: C\n", 14)         = 14
write(1, "domain: /home/till/gutenprint/cvs/HEAD/x\n", 41) = 41
write(1, "codset (null)->UTF-8\n", 21)  = 21
write(1, "selected-domain: gutenprint\n", 28) = 28
write(1, "lookup: Five Color Photo Composite\n", 35) = 35
write(1, "dlookup: Five Color Photo Composite\n", 36) = 36
exit_group(0)                           = ?

  parent reply	other threads:[~2008-08-04 21:08 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-30 15:50 [Printing-architecture] Common Printing Dialog: PPD extension specs updated Till Kamppeter
     [not found] ` <4890962F.4000305@apple.com>
2008-07-30 16:38   ` Till Kamppeter
     [not found]     ` <4890AD59.6090902@apple.com>
2008-07-30 19:39       ` [Printing-architecture] [Gimp-print-devel] " Till Kamppeter
2008-07-30 19:54 ` [Printing-architecture] " Till Kamppeter
     [not found]   ` <200807310148.m6V1mTkP006833@dsl092-065-009.bos1.dsl.speakeasy.net>
2008-07-31  7:10     ` [Printing-architecture] [Gimp-print-devel] " Till Kamppeter
     [not found]   ` <200807310223.m6V2NkAv006976@dsl092-065-009.bos1.dsl.speakeasy.net>
2008-07-31  9:18     ` Till Kamppeter
     [not found]       ` <200807311226.m6VCQED9017811@dsl092-065-009.bos1.dsl.speakeasy.net>
2008-07-31 13:38         ` Till Kamppeter
     [not found]           ` <200807311345.m6VDjJFT018162@dsl092-065-009.bos1.dsl.speakeasy.net>
2008-07-31 14:03             ` Till Kamppeter
2008-07-31 14:05         ` Till Kamppeter
     [not found]       ` <200807311309.m6VD9s5n018013@dsl092-065-009.bos1.dsl.speakeasy.net>
2008-07-31 14:02         ` Till Kamppeter
     [not found]         ` <p06110400c4b793ad4cd1@[192.168.1.102]>
     [not found]           ` <200807312114.m6VLEhgd004613@dsl092-065-009.bos1.dsl.speakeasy.net>
2008-07-31 21:37             ` Till Kamppeter
     [not found]               ` <200807312156.m6VLusVF004364@dsl092-065-009.bos1.dsl.speakeasy.net>
2008-08-01  7:09                 ` Till Kamppeter
     [not found]                   ` <200808011134.m71BYXdK003793@dsl092-065-009.bos1.dsl.speakeasy.net>
2008-08-01 12:13                     ` Till Kamppeter
     [not found]                       ` <20080801123314.GA26452@nagini.vm.bytemark.co.uk>
2008-08-01 12:55                         ` Till Kamppeter
     [not found]                           ` <20080801130821.GC26452@nagini.vm.bytemark.co.uk>
2008-08-01 13:19                             ` Till Kamppeter
     [not found]                               ` <48934778.1080504@apple.com>
     [not found]                                 ` <87ej58mptc.fsf@hardknott.home>
     [not found]                                   ` <4893A466.5040103@apple.com>
     [not found]                                     ` <87tze4l0sr.fsf@hardknott.home>
     [not found]                                       ` <200808020120.m721K3Uw007245@dsl092-065-009.bos1.dsl.speakeasy.net>
     [not found]                                         ` <87wsizvbdh.fsf@hardknott.home>
     [not found]                                           ` <87ej57v8gj.fsf@hardknott.home>
2008-08-04 14:41                                             ` Till Kamppeter
2008-08-04 21:08                                             ` Till Kamppeter [this message]
     [not found]                                               ` <873alk8lwp.fsf@hardknott.home>
2008-08-04 22:41                                                 ` Till Kamppeter
     [not found]                         ` <200808011243.m71ChRZ9004044@dsl092-065-009.bos1.dsl.speakeasy.net>
     [not found]                           ` <20080801130240.GB26452@nagini.vm.bytemark.co.uk>
     [not found]                             ` <200808011308.m71D8CMM004429@dsl092-065-009.bos1.dsl.speakeasy.net>
2008-08-01 13:40                               ` Till Kamppeter
     [not found]                           ` <48934629.3060501@apple.com>
2008-08-01 17:26                             ` Till Kamppeter
2008-08-01 12:52                     ` Till Kamppeter
2008-08-01  7:15                 ` Till Kamppeter
     [not found]         ` <4895C323.7060005@apple.com>
     [not found]           ` <200808031506.m73F6GPe025447@dsl092-065-009.bos1.dsl.speakeasy.net>
     [not found]             ` <200808030932.38287.hvengel@astound.net>
2008-08-04 21:53               ` Till Kamppeter
     [not found]                 ` <4897BF6A.9090806@apple.com>
     [not found]                   ` <200808050027.23995.hvengel@astound.net>
2008-08-05  8:20                     ` Till Kamppeter
     [not found]               ` <200808031431.06482.hvengel@astound.net>
2008-08-04 22:22                 ` [Printing-architecture] [Gimp-print-devel] Common Printing Dialog: Color Management (was)PPD " Till Kamppeter
     [not found]                   ` <200808050116.25204.hvengel@astound.net>
2008-08-05  8:30                     ` Till Kamppeter
2008-08-05 12:36                       ` peter sikking

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48976FB0.5020806@gmail.com \
    --to=till.kamppeter@gmail.com \
    --cc=gimp-print-devel@lists.sourceforge.net \
    --cc=jriddell@ubuntu.com \
    --cc=printing-architecture@lists.linux-foundation.org \
    --cc=printing-japan@lists.linux-foundation.org \
    --cc=rleigh@whinlatter.ukfsn.org \
    --cc=rlk@alum.mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.