Red Hat Bugzilla – Bug 212154
should use nl_langinfo(CODESET) instead of '--encoding'
Last modified: 2007-11-30 17:11:46 EST
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):
Steps to Reproduce:
1. LC_ALL=ja_JP.eucJP paps testpage.euc >/dev/null
paps: Invalid character in input
Created attachment 139335 [details]
Created attachment 139336 [details]
Here is the incremental fix.
Created attachment 139337 [details]
New paps-0.6.6-encoding patch incorporating fix.
Created attachment 139338 [details]
New paps-0.6.6-cpilpi patch to resolve patch conflicts.
Created attachment 139339 [details]
New paps-cups patch to resolve patch conflicts.
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.
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).
Fixed in CVS. just waiting for other fixes to build this. or perhaps I should
just go with this.
Fixed in 0.6.6-18.fc6
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.
there is no more error in Rawhide with following version: