Bug 212154 - should use nl_langinfo(CODESET) instead of '--encoding'
should use nl_langinfo(CODESET) instead of '--encoding'
Product: Fedora
Classification: Fedora
Component: paps (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Akira TAGOH
Depends On:
  Show dependency treegraph
Reported: 2006-10-25 08:22 EDT by Tim Waugh
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-09-14 06:25:18 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
testpage.euc (396 bytes, application/octet-stream)
2006-10-25 08:22 EDT, Tim Waugh
no flags Details
paps-encoding.interdiff (1.24 KB, patch)
2006-10-25 08:24 EDT, Tim Waugh
no flags Details | Diff
paps-0.6.6-encoding.patch (3.58 KB, patch)
2006-10-25 08:25 EDT, Tim Waugh
no flags Details | Diff
paps-0.6.6-cpilpi.patch (18.47 KB, patch)
2006-10-25 08:26 EDT, Tim Waugh
no flags Details | Diff
paps-cups.patch (8.58 KB, patch)
2006-10-25 08:26 EDT, Tim Waugh
no flags Details | Diff

  None (edit)
Description Tim Waugh 2006-10-25 08:22:41 EDT
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):

How reproducible:

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

Expected results:
Comment 1 Tim Waugh 2006-10-25 08:22:41 EDT
Created attachment 139335 [details]
Comment 2 Tim Waugh 2006-10-25 08:24:26 EDT
Created attachment 139336 [details]

Here is the incremental fix.
Comment 3 Tim Waugh 2006-10-25 08:25:18 EDT
Created attachment 139337 [details]

New paps-0.6.6-encoding patch incorporating fix.
Comment 4 Tim Waugh 2006-10-25 08:26:06 EDT
Created attachment 139338 [details]

New paps-0.6.6-cpilpi patch to resolve patch conflicts.
Comment 5 Tim Waugh 2006-10-25 08:26:33 EDT
Created attachment 139339 [details]

New paps-cups patch to resolve patch conflicts.
Comment 6 Akira TAGOH 2006-10-25 09:52:48 EDT
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 10:13:26 EDT
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 07:23:26 EST
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 07:21:51 EST
Fixed in 0.6.6-18.fc6
Comment 10 Fedora Update System 2007-03-07 17:57:08 EST
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 05:21:38 EDT
there is no more error in Rawhide with following version:

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