~ubuntu-branches/ubuntu/raring/libencode-perl/raring

« back to all changes in this revision

Viewing changes to lib/Encode/GSM0338.pm

  • Committer: Bazaar Package Importer
  • Author(s): Dominic Hargreaves, Dominic Hargreaves, gregor herrmann
  • Date: 2011-01-04 21:46:25 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 intrepid)
  • Revision ID: james.westby@ubuntu.com-20110104214625-hbpxr6egctsifiqu
Tags: 2.42-1
* New upstream release (Closes: #608294)

[ Dominic Hargreaves ]
* Added myself as an uploader
* Bumped Standards-Version (no changes)

[ gregor herrmann ]
* Switch to source format 3.0 (quilt).
* debian/control: change Vcs-Browser field to ViewSVN.
* debian/watch: use extended regexp to match upstream releases.
* debian/copyright: switch to DEP5 formatting.
* Use debhelper 7 (debian/{rules,control,compat}.
* Add a patch to deal with spelling/grammar problems, and lintian override
  where lintian and /me don't agree on English grammaar.
* Add /me to Uploaders.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
 
# $Id: GSM0338.pm,v 2.0 2007/04/22 14:54:22 dankogai Exp $
 
2
# $Id: GSM0338.pm,v 2.1 2008/05/07 20:56:05 dankogai Exp $
3
3
#
4
4
package Encode::GSM0338;
5
5
 
8
8
use Carp;
9
9
 
10
10
use vars qw($VERSION);
11
 
$VERSION = do { my @r = ( q$Revision: 2.0 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
 
11
$VERSION = do { my @r = ( q$Revision: 2.1 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
12
12
 
13
13
use Encode qw(:fallbacks);
14
14
 
198
198
        }
199
199
        else {
200
200
            $u =
201
 
              exists $GSM2UNI{$c} ? $GSM2UNI{$c}
202
 
              : $chk
203
 
              ? croak sprintf( "\\x%02X does not map to Unicode", ord($c) )
 
201
              exists $GSM2UNI{$c}
 
202
              ? $GSM2UNI{$c}
 
203
              : $chk ? ref $chk eq 'CODE'
 
204
                  ? $chk->( ord $c )
 
205
                  : croak sprintf( "\\x%02X does not map to Unicode", ord($c) )
204
206
              : $FBCHAR;
205
207
        }
206
208
        $str .= $u;
218
220
        my $u = substr( $str, 0, 1, '' );
219
221
        my $c;
220
222
        $bytes .=
221
 
          exists $UNI2GSM{$u} ? $UNI2GSM{$u}
222
 
          : $chk
223
 
          ? croak sprintf( "\\x{%04x} does not map to %s", 
224
 
                           ord($u), $obj->name )
 
223
          exists $UNI2GSM{$u}
 
224
          ? $UNI2GSM{$u}
 
225
          : $chk ? ref $chk eq 'CODE'
 
226
              ? $chk->( ord($u) )
 
227
              : croak sprintf( "\\x{%04x} does not map to %s", 
 
228
                               ord($u), $obj->name )
225
229
          : $FBCHAR;
226
230
    }
227
231
    $_[1] = $str if $chk;