diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Encode/GSM0338.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/Encode/GSM0338.pm | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Master/tlpkg/tlperl/lib/Encode/GSM0338.pm b/Master/tlpkg/tlperl/lib/Encode/GSM0338.pm index aeff6379789..20257a1cbd9 100644 --- a/Master/tlpkg/tlperl/lib/Encode/GSM0338.pm +++ b/Master/tlpkg/tlperl/lib/Encode/GSM0338.pm @@ -1,5 +1,5 @@ # -# $Id: GSM0338.pm,v 2.2 2012/08/15 05:36:16 dankogai Exp $ +# $Id: GSM0338.pm,v 2.5 2013/09/14 07:51:59 dankogai Exp $ # package Encode::GSM0338; @@ -8,11 +8,11 @@ use warnings; use Carp; use vars qw($VERSION); -$VERSION = do { my @r = ( q$Revision: 2.2 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; +$VERSION = do { my @r = ( q$Revision: 2.5 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; use Encode qw(:fallbacks); -use base qw(Encode::Encoding); +use parent qw(Encode::Encoding); __PACKAGE__->Define('gsm0338'); sub needs_lines { 1 } @@ -171,7 +171,7 @@ our $NBSP = "\x{00A0}"; sub decode ($$;$) { my ( $obj, $bytes, $chk ) = @_; - my $str; + my $str = substr($bytes, 0, 0); # to propagate taintedness; while ( length $bytes ) { my $c = substr( $bytes, 0, 1, '' ); my $u; @@ -216,7 +216,7 @@ sub decode ($$;$) { sub encode($$;$) { my ( $obj, $str, $chk ) = @_; - my $bytes; + my $bytes = substr($str, 0, 0); # to propagate taintedness while ( length $str ) { my $u = substr( $str, 0, 1, '' ); my $c; @@ -259,7 +259,7 @@ this module. =head1 NOTES -Unlike most other encodings, the following aways croaks on error +Unlike most other encodings, the following always croaks on error for any $chk that evaluates to true. $gsm0338 = encode("gsm0338", $utf8 $chk); |