Bug 161763 - a2ps can't handle euc-jp text
a2ps can't handle euc-jp text
Product: Fedora
Classification: Fedora
Component: a2ps (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Depends On:
Blocks: FC6Update
  Show dependency treegraph
Reported: 2005-06-26 23:02 EDT by Tetsuya Kawamura
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 4.13b-57.fc6.3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-10-31 05:27:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
test file that includes euc-jp characters (8 bytes, text/plain)
2006-10-25 20:44 EDT, Tetsuya Kawamura
no flags Details

  None (edit)
Description Tetsuya Kawamura 2005-06-26 23:02:12 EDT
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 fc4out.ps  example_euc.txt
3. Check fc4out.ps

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 06:05:40 EDT
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 08:57:42 EST
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 10:12:07 EDT
Does this problem still occur?
Comment 4 Tetsuya Kawamura 2006-10-16 21:37:04 EDT
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 05:38:00 EDT
(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 10:10:58 EDT
FWIW, paps works fine with my testing.

Could you attach the test file you're using please?
Comment 7 Tim Waugh 2006-10-25 12:17:45 EDT
Think I've found the problem.  Please watch for an updates-testing package..
Comment 8 Tetsuya Kawamura 2006-10-25 20:44:14 EDT
Created attachment 139426 [details]
test file that includes euc-jp characters

Anyway, here's my test file.
Comment 9 Tim Waugh 2006-10-26 12:39:39 EDT
The test update is available now:

Comment 10 Tetsuya Kawamura 2006-10-26 20:35:04 EDT
The test update works fine.
Comment 11 Fedora Update System 2006-10-30 16:37:17 EST
Fixed in update: a2ps-4.13b-57.fc6.3

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