[cups.general] pdftops locale problem

Olaf Meeuwissen olaf.meeuwissen at avasys.jp
Tue Jun 10 16:55:22 PDT 2008


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,
-- 
Olaf Meeuwissen                   FLOSS Engineer -- AVASYS Corporation
FSF Associate Member #1962           sign up at http://member.fsf.org/





More information about the cups mailing list