Avoid feeding decoded unicode to Term::ReadLine
authorJoey Hess <joey@gnu.kitenet.net>
Sun, 18 Jan 2009 19:52:49 +0000 (14:52 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Sun, 18 Jan 2009 19:52:49 +0000 (14:52 -0500)
That resulted in double encoded display when using perl's stub
readline module. Apparently that module unconditionally upgrades
text to utf8, in a quite braindead way.

(Term::ReadLine::Gnu::Perl worked ok.)

IkiWiki/Setup/Automator.pm
debian/changelog

index b7798fcec09c287ae247bc12d6c9923ae8b3971d..42caf3039a9d79fc9686adc206b5b874eb2b3bdf 100644 (file)
@@ -9,12 +9,13 @@ use IkiWiki;
 use IkiWiki::UserInfo;
 use Term::ReadLine;
 use File::Path;
+use Encode;
 
 sub ask ($$) {
        my ($question, $default)=@_;
 
        my $r=Term::ReadLine->new("ikiwiki");
-       $r->readline($question." ", $default);
+       $r->readline(encode_utf8($question)." ", $default);
 }
 
 sub prettydir ($) {
index 013dc1884455e073ea4f95993cbd7f88d62844d6..6e8a54d9d52213bb0c3171da4ae484b4572d3141 100644 (file)
@@ -1,3 +1,10 @@
+ikiwiki (3.03) UNRELEASED; urgency=low
+
+  * Avoid feeding decoded unicode to Term::ReadLine.
+    Closes: 512169
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 18 Jan 2009 14:50:57 -0500
+
 ikiwiki (3.02) unstable; urgency=low
 
   * blogspam: New plugin, adding spam filtering for page editing / comment