summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-misc/cowsay/files/cowsay-3.04-utf8.patch')
-rw-r--r--games-misc/cowsay/files/cowsay-3.04-utf8.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/games-misc/cowsay/files/cowsay-3.04-utf8.patch b/games-misc/cowsay/files/cowsay-3.04-utf8.patch
new file mode 100644
index 000000000000..3aeaf0d66c14
--- /dev/null
+++ b/games-misc/cowsay/files/cowsay-3.04-utf8.patch
@@ -0,0 +1,17 @@
+diff -Naur cowsay-3.03.orig//cowsay cowsay-3.03/cowsay
+--- rank-amateur-cowsay-cowsay-3.04/cowsay.orig 2011-04-21 16:36:03.581377699 +0200
++++ rank-amateur-cowsay-cowsay-3.04/cowsay 2011-04-21 16:37:07.968430100 +0200
+@@ -12,6 +12,13 @@
+ 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";