Re: debconf w/ charset encoding support
Hi,
At Wed, 18 Sep 2002 23:37:33 +0900,
Tomohiro KUBOTA wrote:
> I imagine some automatic Unicode conversion faculty of Perl might
> be working. Thus, $ret="\xe8\xa8\xad" might be interpreted as
> U+00E8 U+00A8 U+00AD. However, "use utf8;" is not found in any
> of Debconf code and I have no idea why this occurs....
Colin's following message helped me very much.
http://lists.debian.org/debian-devel/2002/debian-devel-200209/msg01338.html
I applied the following patch. Then,
"LANG=ja_JP.UTF-8 dpkg-reconfigure debconf" with modified
("Description-ja:" -> "Description-ja.UTF-8:") templates in
UTF-8 terminal worked partly well. I don't know whether
this is the right place for this modification or even I don't
know whether this modification has some bad side-effects.
Also, I think other programs than dpkg-reconfigure will need
similar modification.
By using this patch, almost displayed messages are good, but
I found that the line-breaking algorithm must be improved to
handle UTF-8 (and other encodings). Text::Wrap cannot be used.
--- dpkg-reconfigure.orig 2002-09-19 22:48:45.000000000 +0900
+++ dpkg-reconfigure 2002-09-19 22:48:38.000000000 +0900
@@ -1,6 +1,7 @@
#!/usr/bin/perl -w
# This file was preprocessed, do not edit!
my $infodir="/var/lib/dpkg/info";
+binmode(STDOUT); binmode(STDERR);
use strict;
use Debconf::Db;
use Debconf::Gettext;
---
Tomohiro KUBOTA <kubota@debian.org>
http://www.debian.or.jp/~kubota/
"Introduction to I18N" http://www.debian.org/doc/manuals/intro-i18n/
Reply to: