[cups.general] pdftops locale problem
Christoph Litauer
litauer at uni-koblenz.de
Wed Jun 11 04:37:18 PDT 2008
Olaf Meeuwissen schrieb:
> Klaus Singvogel <kssingvo at suse.de> writes:
>
>> Christoph Litauer wrote:
>>> [snip]>
>>> I can reproduce this error via:
>>>
>>> $ cat 1.pdf | (env PPD=/etc/cups/ppd/pdfmail.ppd LANG=de_DE
>>> /usr/lib/cups/filter/pdftops 11111 someuser sometitle 1 "") | grep 56,
>>> DEBUG: pdftops - copying to temp print file
>>> "/var/spool/cups/tmp/484e68d911d31"
>>> DEBUG: pdftops - opened PPD file "/etc/cups/ppd/pdfmail.ppd"...
>>> DEBUG: pdftops - level = 2, width = 595, length = 842
>>> [1 0 0 1 56,88 774,56] cm
>>> The conversion doesn't take place if I ommit the PPD environment
>>> variable or define another locale (LANG) - unfortunately I cannot
>>> control this behaviour on the clients. This leads to the following
>>> questions:
>>> 1.) Why are the floating numbers only converted it environment variable
>>> PPD is set?
>> The glibc is doing this.
>
> Because the filter(s) didn't bother to tell it otherwise.
>
>> If you want to print the text "€" then locale says that the Euro-Sign
>> should be printed and not a different symbol.
>> But the very same module also converts your output of numbers from
>> "5.1" to "5,1" as your country says that this is official sign for
>> number separation. :-)
>>
>>> 2.) What can I do against this conversion?
>> Don't use any other locale than LANG=C or LANG=POSIX
>>
>> You might want to edit /etc/init.d/cups and add a line:
>> LANG=C
>>
>> even a line could help:
>> LC_NUMBER=POSIX
>
> That'd be LC_NUMERIC and if that helps, filter programs can and should
> do the same thing for you.
>
>> Note: I haven't tested my advice, but I think it "fix" it.
>
> Hope this helps,
Thanks a lot. I decided to use Helges alternate pdftops filter.
--
Regards
Christoph
________________________________________________________________________
Christoph Litauer litauer at uni-koblenz.de
Uni Koblenz, Computing Center, http://www.uni-koblenz.de/~litauer
Postfach 201602, 56016 Koblenz Fon: +49 261 287-1311, Fax: -100 1311
PGP-Fingerprint: F39C E314 2650 650D 8092 9514 3A56 FBD8 79E3 27B2
More information about the cups
mailing list