aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/bin
diff options
context:
space:
mode:
authorAnthony Fok <foka>2011-04-07 08:23:17 +0000
committerAnthony Fok <foka>2011-04-07 08:23:17 +0000
commitb20f75ba9962e7dc695339b0313cc9d0a725160e (patch)
treed6b9fb830533c1c3f2d3a04fcd33cc96686ba949 /chinese/bin
parentb3e866068a0f42e6dd8bd31dab0aaa3ef07c9b56 (diff)
Addition of -CSD to Perl shebang line to chinese/bin/*.pl for UTF-8
caused WML run fail with "Too late for "-CSD" option, as seen on http://www-master.debian.org/build-logs/webwml/wml_run.log dated 2011-04-07 03:42: Processing contact.wml: Too late for "-CSD" option at ./bin/fix_big5.pl line 1. ** IPP:Error: Prolog Filter `./bin/fix_big5.pl' failed ** WML:Break: Error in Pass 1 (rc=1). make[1]: *** [contact.zh-cn.html] Error 1 make[1]: Leaving directory `/srv/www.debian.org/webwml/chinese' make: *** [chinese-install] Error 2 (Strange, it works locally on my Debian sid system.) Modify these scripts to use use open ':std', ':utf8'; instead, thanks to helpful hints from the following pages: "Too late for -CS" Howto * http://www.fi.muni.cz/~kas/blog/index.cgi/computers/too-late-for-cs-howto.html Re: [perl #59652] "Too late for "-CS" option" * http://www.nntp.perl.org/group/perl.perl5.porters/2008/10/msg140489.html CVS version numbers chinese/bin/fix_big5.pl: 1.9 -> 1.10 chinese/bin/tocn.pl: 1.41 -> 1.42 chinese/bin/totw.pl: 1.39 -> 1.40
Diffstat (limited to 'chinese/bin')
-rwxr-xr-xchinese/bin/fix_big5.pl7
-rwxr-xr-xchinese/bin/tocn.pl7
-rwxr-xr-xchinese/bin/totw.pl7
3 files changed, 12 insertions, 9 deletions
diff --git a/chinese/bin/fix_big5.pl b/chinese/bin/fix_big5.pl
index 384925d91da..e26e2da226b 100755
--- a/chinese/bin/fix_big5.pl
+++ b/chinese/bin/fix_big5.pl
@@ -1,12 +1,13 @@
-#!/usr/bin/perl -p -CSD
+#!/usr/bin/perl -p
# $Id$
use strict;
use warnings;
use utf8;
-binmode STDIN, ':encoding(utf8)';
-binmode STDOUT, ':encoding(utf8)';
+use open ':std', ':utf8';
+#binmode STDIN, ':encoding(utf8)';
+#binmode STDOUT, ':encoding(utf8)';
# Fix backslashes in Big5 Chinese characters
#s/^((?:[\x00-\x7F]|(?:[\x80-\xFF].))+[\x80-\xFF]\\)$/$1\\/;
diff --git a/chinese/bin/tocn.pl b/chinese/bin/tocn.pl
index 252690ac9d3..29588ba71db 100755
--- a/chinese/bin/tocn.pl
+++ b/chinese/bin/tocn.pl
@@ -1,12 +1,13 @@
-#!/usr/bin/perl -pi -CSD
+#!/usr/bin/perl -pi
# $Id$
use strict;
use warnings;
use utf8;
-binmode(STDIN, ':encoding(utf8)');
-binmode(STDOUT, ':encoding(utf8)');
+use open ':std', ':utf8';
+#binmode(STDIN, ':encoding(utf8)');
+#binmode(STDOUT, ':encoding(utf8)');
s|^(<html lang="zh)">|$1-CN">|i;
# s|^(\s*<meta http-equiv=.*charset)=big5">|$1=gb2312">|i;
diff --git a/chinese/bin/totw.pl b/chinese/bin/totw.pl
index d72a2d7b7e3..4a51e860a34 100755
--- a/chinese/bin/totw.pl
+++ b/chinese/bin/totw.pl
@@ -1,12 +1,13 @@
-#!/usr/bin/perl -pi -CSD
+#!/usr/bin/perl -pi
# $Id$
use strict;
use warnings;
use utf8;
-binmode(STDIN, ':encoding(utf8)');
-binmode(STDOUT, ':encoding(utf8)');
+use open ':std', ':utf8';
+#binmode(STDIN, ':encoding(utf8)');
+#binmode(STDOUT, ':encoding(utf8)');
$0 =~ m|to(..)\.pl$|;
my $sublang = $1;

© 2014-2024 Faster IT GmbH | imprint | privacy policy