From: Zoltan B. <zb...@du...> - 2005-05-13 06:31:27
|
Hi Bob, Hungarian problems again. :-) Now I reached a phase where my program actually compiles and works under Windows, and links to RLIB. But the resulting PDF is unusable. Of course I saved it in an O_BINARY file. The problem is that printf(), et.al. are conforming to the locale settings, so controlling numbers in the PDFs are written as e.g. /Frpdf0 9,000 Tf instead of /Frpdf0 9.000 Tf since the decimal separator is a comma, not a dot here in Hungary. A simple trick will do it (I fixed unixODBC this way in 2000): ------------------------------------------- char *saved_locale; saved_locale =3D strdup(setlocale(LC_ALL, NULL)); /* national decimal separator here */ setlocale(LC_ALL, "C"); /* decimal dots strictly required here */ setlocale(LC_ALL, saved_locale); /* national decimal separator again */ free(saved_locale); ------------------------------------------- Fortunately setlocale() exists under MingW, too. I haven't made a patch against RPDF yet, but you know better where to fix it. Best regards, Zolt=E1n B=F6sz=F6rm=E9nyi |