bug-a2ps
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with locale (LC_NUMERIC)


From: Michal Kochanowicz
Subject: Problems with locale (LC_NUMERIC)
Date: Sat, 23 Jun 2001 21:19:50 +0200
User-agent: Mutt/1.3.18i

Hi

There is some seriuos problem with locale and a2ps. In english speaking
world fractional part of number is separated by . (dot). But this isn't
true everywhere. In some locales (in polish, for example) , (comma) is
used istaed. This can cause serious problems: if I set polish locale
(LANG=pl_PL) printf() and similar functions will use commas. For
example:
printf("%1.2f", 0.5);
will print:
0,50
It's cool but it makes complete mess of PS files generated by a2ps,
because every fractional number in it's output will have comma instaed
of dot and will be rejected by PS interpreters. This problem can be
easly resolved. I've added following line:
setlocale(LC_NUMERIC, "C");
to jobs.c right after setup of locales performed there. It works, but
I'm not sure if it's right - I've seen some other locale initialization
in main.c.

I hope you will include similar patch in future version of a2ps.

Regards
-- 
--= Michal address@hidden =--
--= finger me for PGP public key or visit http://michal.waw.pl/PGP =--
--==--==--==--==--==-- Vodka. Connecting people.--==--==--==--==--==--



reply via email to

[Prev in Thread] Current Thread [Next in Thread]