Upgrade to Encode 2.00.
[p5sagit/p5-mst-13.2.git] / ext / Encode / lib / Encode / Unicode / UTF7.pm
index c3bcd3b..a91bff7 100644 (file)
@@ -1,12 +1,12 @@
 #
-# $Id: UTF7.pm,v 0.1 2003/05/16 18:06:24 dankogai Exp dankogai $
+# $Id: UTF7.pm,v 2.0 2004/05/16 20:55:17 dankogai Exp $
 #
 package Encode::Unicode::UTF7;
 use strict;
 no warnings 'redefine';
 use base qw(Encode::Encoding);
 __PACKAGE__->Define('UTF-7');
-our $VERSION = do { my @r = (q$Revision: 0.1 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
+our $VERSION = do { my @r = (q$Revision: 2.0 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r };
 use MIME::Base64;
 use Encode;
 
@@ -15,13 +15,13 @@ use Encode;
 #
 
 our $OPTIONAL_DIRECT_CHARS = 1;
-my $specials =   quotemeta "\'(),-.:?";
+my $specials =   quotemeta "\'(),-./:?";
 $OPTIONAL_DIRECT_CHARS and
     $specials .= quotemeta "!\"#$%&*;<=>@[]^_`{|}";
 # \s will not work because it matches U+3000 DEOGRAPHIC SPACE
-# We use \x00-\x20 instead (controls + space)
-my $re_asis =     qr/(?:[\x00-\x20A-Za-z0-9$specials])/;
-my $re_encoded = qr/(?:[^\x00-\x20A-Za-z0-9$specials])/;
+# We use qr/[\n\r\t\ ] instead 
+my $re_asis =     qr/(?:[\n\r\t\ A-Za-z0-9$specials])/;
+my $re_encoded = qr/(?:[^\n\r\t\ A-Za-z0-9$specials])/;
 my $e_utf16 = find_encoding("UTF-16BE");
 
 sub needs_lines { 1 };