Bug 56892
Summary: | a2ps fails on german systems | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Need Real Name <achim.gaedke> | ||||||
Component: | a2ps | Assignee: | Tim Waugh <twaugh> | ||||||
Status: | CLOSED DUPLICATE | QA Contact: | |||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 7.2 | CC: | bernd.bartmann, fabioortlieb | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i386 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2002-01-10 09:36:04 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Need Real Name
2001-11-29 17:33:28 UTC
It seems to be imposible to attach a file with Opera, please download it from http://www.zaik.uni-koeln.de/~achim/amex-adresse.ps This is probably the same as my bug report 56881. Ok, I tried to choose english as session locale: [achim@localhost achim]$ locale LANG=en.ISO-8859-1 LC_CTYPE="en.ISO-8859-1" LC_NUMERIC="en.ISO-8859-1" LC_TIME="en.ISO-8859-1" LC_COLLATE="en.ISO-8859-1" LC_MONETARY="en.ISO-8859-1" LC_MESSAGES="en.ISO-8859-1" LC_PAPER="en.ISO-8859-1" LC_NAME="en.ISO-8859-1" LC_ADDRESS="en.ISO-8859-1" LC_TELEPHONE="en.ISO-8859-1" LC_MEASUREMENT="en.ISO-8859-1" LC_IDENTIFICATION="en.ISO-8859-1" LC_ALL= a2ps results in a core dump... [achim@localhost achim]$ ulimit -S -c unlimited [achim@localhost achim]$ a2ps -1 partitionen -o partitionen.ps Segmentation fault (core dumped) [achim@localhost achim]$ gdb /usr/bin/a2ps --core=core ... and so on... (gdb) bt #0 0x400cb62b in strncmp (s1=0x0, s2=0x8083841 "ja", n=2) at ../sysdeps/generic/strncmp.c:64 #1 0x0804afe4 in strcpy () at ../sysdeps/generic/strcpy.c:31 #2 0x40065306 in __libc_start_main (main=0x804adf0 <strcpy+4472>, argc=5, ubp_av=0xbffffa14, init=0x8049640, fini=0x8079270 <strverscmp+25484>, rtld_fini=0x4000d2cc <_dl_fini>, stack_end=0xbffffa0c) at ../sysdeps/generic/libc-start.c:129 I think there is need of extra testing.... The coredump does not give any clue to the position in source, so I've rebuilt it with CFLAGS="-g -O0" from the source rpm here is the "real" backtrace: #0 0x400cb62b in strncmp (s1=0x0, s2=0x808ff29 "ja", n=2) at ../sysdeps/generic/strncmp.c:64 #1 0x0804b6bb in main (argc=5, argv=0xbffffa14) at main.c:1024 The corresponding line is /* Process special case: Japanese Document */ if (! strncmp (locale, "ja", 2) ) job->requested_encoding_name = xstrdup ("euc-jp"); The variable locale is NULL. These lines come from the a2ps-4.13-autoenc.patch, I could not find out the author of this patch. The core dump happens if LC_* or LANG is set to a value that does not appear with `locale -a`. That happens even if you use values from the gdm chooser. But still the generated postscript file causes errors with gv with any other locale except english ones... 100% reproducible here on my german system. [bart@riker bart]$ locale LANG=de_DE@euro LC_CTYPE="de_DE@euro" LC_NUMERIC="de_DE@euro" LC_TIME="de_DE@euro" LC_COLLATE="de_DE@euro" LC_MONETARY="de_DE@euro" LC_MESSAGES="de_DE@euro" LC_PAPER="de_DE@euro" LC_NAME="de_DE@euro" LC_ADDRESS="de_DE@euro" LC_TELEPHONE="de_DE@euro" LC_MEASUREMENT="de_DE@euro" LC_IDENTIFICATION="de_DE@euro" LC_ALL= When using the above locale settings it also doesn't work for me. After "LC_ALL=C ; export LC_ALL" I get this settings: [bart@riker tmp]$ locale LANG=de_DE@euro LC_CTYPE="C" LC_NUMERIC="C" LC_TIME="C" LC_COLLATE="C" LC_MONETARY="C" LC_MESSAGES="C" LC_PAPER="C" LC_NAME="C" LC_ADDRESS="C" LC_TELEPHONE="C" LC_MEASUREMENT="C" LC_IDENTIFICATION="C" LC_ALL=C In both cases I tried a simple "a2ps -o file.ps /etc/hosts". It only works with LC_ALL=C. With the german locale neither gv nor my postscript printer like the a2ps output. I have attached the two files created by a2ps. By using "diff -u file1.ps file2.ps" I found out that when using the german locale floating point number in the postscript output contain a comma instead of a dot. This is correct for the german locale but not in a postscript source code. Created attachment 39327 [details]
german locale output of "a2ps -o file.ps /etc/hosts"
Created attachment 39328 [details]
C locale output of "a2ps -o file.ps /etc/hosts"
Great, thats the reason! I think, it is the best way to implement an own function for floating point numbers in postscript documents instead of switching the locale. I hope someone will do it soon. Thanks for help. This bug looks like the same things as bug #53715. Sorry guys, but I can't have a look at bug #53715: Permission denied. Even when I log in with my normal Bugzilla account I'm not allowed to see this bug. Yes, I do have the same problem! *** This bug has been marked as a duplicate of 40532 *** *** Bug 541014 has been marked as a duplicate of this bug. *** |