Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

* Fix bug introduced in last modify, command line tool should set STD…

…OUT utf8

  if -u.
  • Loading branch information...
commit 417ec53ce32b9300bb0083cde7fb5b9a575034bf 1 parent f0f96b6
@kcwu kcwu authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  bin/b2g.pl
  2. +1 −1  bin/g2b.pl
View
2  bin/b2g.pl
@@ -73,7 +73,7 @@ BEGIN
sub convert {
my ($fh) = @_;
- if (UTF8 and $] >= 5.008) { binmode($fh, ':utf8'); binmode($fh, ':utf8') }
+ if (UTF8 and $] >= 5.008) { binmode($fh, ':utf8'); binmode(STDOUT, ':utf8') }
while (<$fh>) {
if (UTF8) { Encode::HanConvert::trad_to_simp($_) }
else { Encode::HanConvert::big5_to_gb($_) }
View
2  bin/g2b.pl
@@ -73,7 +73,7 @@ BEGIN
sub convert {
my ($fh) = @_;
- if (UTF8 and $] >= 5.008) { binmode($fh, ':utf8'); binmode($fh, ':utf8') }
+ if (UTF8 and $] >= 5.008) { binmode($fh, ':utf8'); binmode(STDOUT, ':utf8') }
while (<$fh>) {
if (UTF8) { Encode::HanConvert::simp_to_trad($_) }
else { Encode::HanConvert::gb_to_big5($_) }
Please sign in to comment.
Something went wrong with that request. Please try again.