| 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/); |
| 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 |
} |
} |
| 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 |
| 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 |