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 212154 - should use nl_langinfo(CODESET) instead of '--encoding'
Summary: should use nl_langinfo(CODESET) instead of '--encoding'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: paps
Version: 6
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Akira TAGOH
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-10-25 12:22 UTC by Tim Waugh
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-09-14 10:25:18 UTC


Attachments (Terms of Use)
testpage.euc (deleted)
2006-10-25 12:22 UTC, Tim Waugh
no flags Details
paps-encoding.interdiff (deleted)
2006-10-25 12:24 UTC, Tim Waugh
no flags Details | Diff
paps-0.6.6-encoding.patch (deleted)
2006-10-25 12:25 UTC, Tim Waugh
no flags Details | Diff
paps-0.6.6-cpilpi.patch (deleted)
2006-10-25 12:26 UTC, Tim Waugh
no flags Details | Diff
paps-cups.patch (deleted)
2006-10-25 12:26 UTC, Tim Waugh
no flags Details | Diff

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


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