Bug 64584 - can't print out for CJK
can't print out for CJK
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: a2ps (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-05-08 06:44 EDT by Akira TAGOH
Modified: 2008-05-01 11:38 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-05-08 07:22:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
please try it with a2ps -X euc-jp test and a2ps -X latin1 test. (7 bytes, text/plain)
2002-05-08 07:03 EDT, Akira TAGOH
no flags Details
this result is generated by default or -X latin1. Japanese is broken. (17.36 KB, application/postscript)
2002-05-08 07:05 EDT, Akira TAGOH
no flags Details
this result is generated by -X euc-jp. (18.42 KB, application/postscript)
2002-05-08 07:05 EDT, Akira TAGOH
no flags Details

  None (edit)
Description Akira TAGOH 2002-05-08 06:44:39 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408

Description of problem:
a2ps has a default encoding in /etc/a2ps-site.cfg. but this stuff is described
as latin1. so a2ps can't generate correct PS by default. this spec will confuses
the users. I think a2ps should refer to the current locale for default encoding.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.install a2ps (or don't touch /etc/a2ps-site.cfg)
2.a2ps something_like_japanese_text_file
3.
	

Actual Results:  printer print broken characters out. or when I specify a file
with -o option, gs and gv show the broken characters.

Expected Results:  should print out correctly.

Additional info:
Comment 1 Tim Waugh 2002-05-08 06:49:19 EDT
If you comment out the line 'Options: --encoding=latin1', does that help?  Or  
does a2ps need to be taught to figure out a sensible encoding based on locale?  
  
(If it needs to figure it out, any pointer on how to do this?) 
 
Please attach a file I can test with.  Thanks.
Comment 2 Akira TAGOH 2002-05-08 07:02:05 EDT
Well, I commented out Option line on /etc/a2ps-site.cfg. Unfortunately  a2ps has
crashed ;)

(gdb) r
Starting program: /usr/bin/a2ps '-o t.ps test'
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x0805fc5f in strlower ()
(gdb) bt
#0  0x0805fc5f in strlower ()
#1  0x0805dc3e in get_encoding_by_alias ()
#2  0x0805eb67 in a2ps_job_finalize ()
#3  0x0804afc5 in main ()
#4  0x42017499 in __libc_start_main () from /lib/i686/libc.so.6

I'm not sure now I can't review a2ps's source code since HDD on our server is
crashed, doesn't nl_langinfo(CODESET) help you?
Comment 3 Akira TAGOH 2002-05-08 07:03:02 EDT
Created attachment 56644 [details]
please try it with a2ps -X euc-jp test and a2ps -X latin1 test.
Comment 4 Akira TAGOH 2002-05-08 07:05:02 EDT
Created attachment 56645 [details]
this result is generated by default or -X latin1. Japanese is broken.
Comment 5 Akira TAGOH 2002-05-08 07:05:57 EDT
Created attachment 56646 [details]
this result is generated by -X euc-jp.
Comment 6 Tim Waugh 2002-05-08 07:22:04 EDT
A quick test (with -X $(locale charmap)) indicates that nl_langinfo(CODESET) 
is the correct fix.  Thanks.
Comment 7 Tim Waugh 2002-05-30 12:37:33 EDT
Fixed in a2ps-4.13b-21.

Note You need to log in before you can comment on or make changes to this bug.