Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 161763

Summary: a2ps can't handle euc-jp text
Product: [Fedora] Fedora Reporter: Tetsuya Kawamura <tkawamura>
Component: a2psAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: 4.13b-57.fc6.3 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-10-31 10:27:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 207681    
Description Flags
test file that includes euc-jp characters none

Description Tetsuya Kawamura 2005-06-27 03:02:12 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.7.8) Gecko/20050524 Fedora/1.0.4-4 Firefox/1.0.4

Description of problem:
a2ps can't convert euc-jp text file into legal PostScript file.

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

How reproducible:

Steps to Reproduce:
1.Prepare an euc-jp text file.
  I use example_euc.txt which include 2 Kanji characters, 0xb4c1 0xbbfa 0x0a (i.e. Kanji in Kanji character) in the following example.
2. Convert into a PostScript file.
LANG=ja_JP.eucJP /usr/bin/a2ps --encoding=euc-jp -o  example_euc.txt
3. Check

Actual Results:  The PostScript file includes a wrong octal representation of the input.
If you use the above example input, you'll see the following line in
the PostScript file:
     (\301\372) p n

Expected Results:  If you use the above example input, you must see the following line
in the Poscript file:
    (\264\301\273\372) p n
since 0xb4 is 0264 in octal, 0xc1 is 0301 in octal, and so on.

Additional info:

a2ps in FC2 works fine so that I suspect something has been changed between the two versions of a2ps.

Comment 1 s_h_o_ 2005-08-18 10:05:40 UTC
I, too, see this problem.  And when I downgrade to the FC3 package (a2ps-4.13b-
41.i386.rpm), it works correctly.  

Comment 2 Won Kyu Park 2005-12-09 13:57:42 UTC
euc-kr also have this problem and I found that, when I compile it with

$ rpm -bp a2ps.spec
$ cd BUILD/a2ps-1.13.x
$ make

a2ps works correctly :(

I think it is gcc related things, when I compile a2ps with default CFLAGS, it
works correctly but with the RPM compiler options it fails.

Comment 3 Tim Waugh 2006-10-13 14:12:07 UTC
Does this problem still occur?

Comment 4 Tetsuya Kawamura 2006-10-17 01:37:04 UTC
Yes. The current version in FC5, a2ps-4.13b-49 gives the same result.
I have'nt check the one in FC6-test?, though.

Comment 5 Tetsuya Kawamura 2006-10-25 09:38:00 UTC
(In reply to comment #4)
> Yes. The current version in FC5, a2ps-4.13b-49 gives the same result.
> I have'nt check the one in FC6-test?, though.

I just checked a2ps in FC6 (a2ps-4.13b-57).
The result is the same.

Comment 6 Tim Waugh 2006-10-25 14:10:58 UTC
FWIW, paps works fine with my testing.

Could you attach the test file you're using please?

Comment 7 Tim Waugh 2006-10-25 16:17:45 UTC
Think I've found the problem.  Please watch for an updates-testing package..

Comment 8 Tetsuya Kawamura 2006-10-26 00:44:14 UTC
Created attachment 139426 [details]
test file that includes euc-jp characters

Anyway, here's my test file.

Comment 9 Tim Waugh 2006-10-26 16:39:39 UTC
The test update is available now:

Comment 10 Tetsuya Kawamura 2006-10-27 00:35:04 UTC
The test update works fine.

Comment 11 Fedora Update System 2006-10-30 21:37:17 UTC
Fixed in update: a2ps-4.13b-57.fc6.3