severity 254557 important
tags 254557 patch
thanks

[raising severity as Unicode support is, well, important :)]

Attached is a patch that turns on perl's utf-8 layer in STDIN, STDOUT 
and @ARGV *iff* the locale is utf-8 enabled.

The ${^UTF8LOCALE} is available since perl 5.8.7 (etch has 5.8.8)

Thanks for considering.

-- 
dam            JabberID: [EMAIL PROTECTED]
commit 4dc1d3f27e7f779c701d101e4b6d25472c98ae07
Author: Damyan Ivanov <[EMAIL PROTECTED]>
Date:   Thu Aug 14 12:43:52 2008 +0300

    utf8 support in input, output and arguments on utf8-enabled locales
    
    Closes: #254557 -- doesn't properly support UTF-8

diff --git a/cowsay b/cowsay
index 944d748..391efbf 100755
--- a/cowsay
+++ b/cowsay
@@ -12,6 +12,13 @@ use File::Basename;
 use Getopt::Std;
 use Cwd;
 
+if (${^UTF8LOCALE}) {
+    binmode STDIN, ':utf8';
+    binmode STDOUT, ':utf8';
+    require Encode;
+    eval { $_ = Encode::decode_utf8($_,1) } for @ARGV;
+}
+
 $version = "3.03";
 $progname = basename($0);
 $eyes = "oo";
diff --git a/debian/changelog b/debian/changelog
index 5cafeaa..16fd983 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+cowsay (3.03-9.3) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * turn utf8 support for input, output and arguments in utf8-enabled locales.
+    Closes: #254557 -- doesn't properly support UTF-8
+
+ -- Damyan Ivanov <[EMAIL PROTECTED]>  Thu, 14 Aug 2008 12:14:54 +0300
+
 cowsay (3.03-9.2) unstable; urgency=low
 
   * NMU to fix breakages introduced with last NMU.

Attachment: signature.asc
Description: Digital signature

Reply via email to