/[pub]/test/oldencodeutils/lib/Encode/Unicode/UTF1.pm
Suika

Diff of /test/oldencodeutils/lib/Encode/Unicode/UTF1.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by wakaba, Thu Jul 25 11:24:36 2002 UTC revision 1.5 by wakaba, Mon Sep 23 08:28:39 2002 UTC
# Line 1  Line 1 
1  require 5.8.0;  require 5.7.3;
2  package Encode::Unicode::UTF1;  package Encode::Unicode::UTF1;
3  use strict;  use strict;
4  use vars qw(%DEFAULT $VERSION);  use vars qw($VERSION);
5  $VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};  $VERSION=do{my @r=(q$Revision$=~/\d+/g);sprintf "%d."."%02d" x $#r,@r};
6  use base qw(Encode::Encoding);  use base qw(Encode::Encoding);
7  __PACKAGE__->Define (qw/ISO-10646-UTF-1 utf-1 utf1 csISO10646UTF1 iso-ir-178/);  __PACKAGE__->Define (qw/ISO-10646-UTF-1 utf-1 utf1 csISO10646UTF1 iso-ir-178/);
# Line 22  sub decode ($$;$) { Line 22  sub decode ($$;$) {
22    $str =~ s{([\xA0-\xF5].|[\xF6-\xFB]..|[\xFC-\xFF]....)}{    $str =~ s{([\xA0-\xF5].|[\xF6-\xFB]..|[\xFC-\xFF]....)}{
23      chr (_utf1toucs4 (unpack 'C*', $1))      chr (_utf1toucs4 (unpack 'C*', $1))
24    }gex;    }gex;
   Encode::_utf8_on ($str);  
25    $_[1] = '' if $chk;    $_[1] = '' if $chk;
26    return $str;    return $str;
27  }  }
# Line 92  Encode::Unicode::UTF1 --- Encode/decode Line 91  Encode::Unicode::UTF1 --- Encode/decode
91    
92  =head1 LICENSE  =head1 LICENSE
93    
94  Copyright 2002 wakaba E<lt>w@suika.fam.cxE<gt>.  Copyright 2002 Wakaba E<lt>w@suika.fam.cxE<gt>.
95    
96  This program is free software; you can redistribute it and/or modify  This program is free software; you can redistribute it and/or modify
97  it under the terms of the GNU General Public License as published by  it under the terms of the GNU General Public License as published by
# Line 109  along with this program; see the file CO Line 108  along with this program; see the file CO
108  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,  the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
109  Boston, MA 02111-1307, USA.  Boston, MA 02111-1307, USA.
110    
 =head1 CHANGE  
   
 See F<ChangeLog>.  
 $Date$  
   
111  =cut  =cut
112    
113    # $Date$
114    ### UTF1.pm ends here

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24