Bug 212154

Summary: should use nl_langinfo(CODESET) instead of '--encoding'
Product: [Fedora] Fedora Reporter: Tim Waugh <twaugh>
Component: papsAssignee: Akira TAGOH <tagoh>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6CC: eng-i18n-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-09-14 10:25:18 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 Flags
testpage.euc
none
paps-encoding.interdiff
none
paps-0.6.6-encoding.patch
none
paps-0.6.6-cpilpi.patch
none
paps-cups.patch none

Description Tim Waugh 2006-10-25 12:22:41 UTC
Description of problem:
The --encoding option added in the paps-0.6.6-encoding patch might be better
implemented by using nl_langinfo(CODESET).  That way LC_CTYPE can work properly
with paps, and it can pick up the correct character encoding type automatically.

Version-Release number of selected component (if applicable):
paps-0.6.6-16.fc6

How reproducible:
100%

Steps to Reproduce:
1. LC_ALL=ja_JP.eucJP paps testpage.euc >/dev/null
  
Actual results:
paps: Invalid character in input

Expected results:
Success.

Comment 1 Tim Waugh 2006-10-25 12:22:41 UTC
Created attachment 139335 [details]
testpage.euc

Comment 2 Tim Waugh 2006-10-25 12:24:26 UTC
Created attachment 139336 [details]
paps-encoding.interdiff

Here is the incremental fix.

Comment 3 Tim Waugh 2006-10-25 12:25:18 UTC
Created attachment 139337 [details]
paps-0.6.6-encoding.patch

New paps-0.6.6-encoding patch incorporating fix.

Comment 4 Tim Waugh 2006-10-25 12:26:06 UTC
Created attachment 139338 [details]
paps-0.6.6-cpilpi.patch

New paps-0.6.6-cpilpi patch to resolve patch conflicts.

Comment 5 Tim Waugh 2006-10-25 12:26:33 UTC
Created attachment 139339 [details]
paps-cups.patch

New paps-cups patch to resolve patch conflicts.

Comment 6 Akira TAGOH 2006-10-25 13:52:48 UTC
It could be an one of option, but basically I think only that way isn't
sufficient.  those patch is assuming that all possible encoding can be used from
the locale. but it may be not. also, it enforces people to specify the proper
locale name other than encoding to print them out correctly. it's not
comfortable to me.

One more things are, how come you think that it may be better way? specifying
the proper LC_CTYPE means one knows that which encoding the text file uses,
doesn't it? So I don't see any difference between both ways.  When one doesn't
specifies --encoding option, referring to LC_CTYPE to guess the text encoding is
a good idea though.

Comment 7 Tim Waugh 2006-10-25 14:13:26 UTC
Well, perhaps have a --encoding option in addition to using nl_langinfo(CODESET)
for the default.  I just wanted to avoid having to specify '--encoding' whenever
UTF-8 is not the default encoding (i.e. when LC_CTYPE, LANG or LC_ALL is set).

Comment 8 Akira TAGOH 2007-02-20 12:23:26 UTC
Fixed in CVS. just waiting for other fixes to build this. or perhaps I should
just go with this.

Comment 9 Akira TAGOH 2007-03-07 12:21:51 UTC
Fixed in 0.6.6-18.fc6

Comment 10 Fedora Update System 2007-03-07 22:57:08 UTC
paps-0.6.6-18.fc6 has been pushed for fc6, which should resolve this issue.  If these problems are still present in this version, then please make note of it in this bug report.

Comment 11 A S Alam 2007-09-14 09:21:38 UTC
there is no more error in Rawhide with following version:
paps-0.6.6-21.fc8