r46116 - in /trunk/libmime-charset-perl: Changes Charset.pm Charset/JA_JP.pod META.yml debian/changelog debian/control

jawnsy-guest at users.alioth.debian.org jawnsy-guest at users.alioth.debian.org
Tue Oct 20 16:55:44 UTC 2009


Author: jawnsy-guest
Date: Tue Oct 20 16:55:39 2009
New Revision: 46116

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46116
Log:
* New upstream release
* Standards-Version 3.8.3 (drop perl version dependency)

Modified:
    trunk/libmime-charset-perl/Changes
    trunk/libmime-charset-perl/Charset.pm
    trunk/libmime-charset-perl/Charset/JA_JP.pod
    trunk/libmime-charset-perl/META.yml
    trunk/libmime-charset-perl/debian/changelog
    trunk/libmime-charset-perl/debian/control

Modified: trunk/libmime-charset-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/Changes?rev=46116&op=diff
==============================================================================
--- trunk/libmime-charset-perl/Changes (original)
+++ trunk/libmime-charset-perl/Changes Tue Oct 20 16:55:39 2009
@@ -1,3 +1,15 @@
+2009-10-19	Hatuka*nezumi - IKEDA Soji	<hatuka(at)nezumi.nu>
+
+	* Release 1.008.
+	* Imp: support for iso-8859-6-[ei], iso-8859-8-[ei].  cf. report by
+	  Hanne Moa on Sympa bug #6385 at <http://sourcesup.cru.fr/>.
+	* Imp: support for iso-8859-16.
+	* Imp: Allow body transfer-encoding profile "S".
+	* Chg: Default body transfer-encoding for UTF-8 from "B" to "S".
+	* Doc: Some fixes. New section "Incompatible changes".
+	* Fix: META.yml: optional_features is not hashref but arrayref.
+	  Thanks SREZIC at CPAN.
+
 2009-06-16	Hatuka*nezumi - IKEDA Soji	<hatuka(at)nezumi.nu>
 
 	* Release 1.007.1.

Modified: trunk/libmime-charset-perl/Charset.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/Charset.pm?rev=46116&op=diff
==============================================================================
--- trunk/libmime-charset-perl/Charset.pm (original)
+++ trunk/libmime-charset-perl/Charset.pm Tue Oct 20 16:55:39 2009
@@ -123,14 +123,14 @@
     }
 }
 
-$VERSION = '1.007.1';
+$VERSION = '1.008';
 
 ######## Private Attributes ########
 
 my $DEFAULT_CHARSET = 'US-ASCII';
 my $FALLBACK_CHARSET = 'UTF-8';
 
-# This table was borrwed from Python email package.
+# This table was initially borrowed from Python email package.
 
 my %CHARSETS = (# input		    header enc body enc output conv
 		'ISO-8859-1' =>		['Q',	'Q',	undef],
@@ -147,6 +147,7 @@
 		'ISO-8859-13' =>	['Q',	'Q',	undef],
 		'ISO-8859-14' =>	['Q',	'Q',	undef],
 		'ISO-8859-15' =>	['Q',	'Q',	undef],
+		'ISO-8859-16' =>	['Q',	'Q',	undef],
 		'WINDOWS-1252' =>	['Q',	'Q',	undef],
 		'VISCII' =>		['Q',	'Q',	undef],
 		'US-ASCII' =>		[undef,	undef,	undef],
@@ -195,8 +196,10 @@
 				     ['cp1256'],        # Encode::Byte
 				     # ['cp1006'],      # ditto, for Farsi
 				    ],
+		    'ISO-8859-6-I'=>[['cp1256'], ],     # ditto
 		    'ISO-8859-7' => [['cp1253'], ],     # Encode::Byte
 		    'ISO-8859-8' => [['cp1255'], ],     # Encode::Byte
+		    'ISO-8859-8-I'=>[['cp1255'], ],     # ditto
 		    'ISO-8859-9' => [['cp1254'], ],     # Encode::Byte
 		    'ISO-8859-13'=> [['cp1257'], ],     # Encode::Byte
 		    'GB2312'     => [['cp936'], ],      # Encode::CN
@@ -226,6 +229,10 @@
 		    'UTF-8'      => [['utf8'], ],       # Special name on Perl
 		},
 		'STANDARD' => {
+		    'ISO-8859-6-E'  => [['iso-8859-6'],],# Encode::Byte
+		    'ISO-8859-6-I'  => [['iso-8859-6'],],# ditto
+		    'ISO-8859-8-E'  => [['iso-8859-8'],],# Encode::Byte
+		    'ISO-8859-8-I'  => [['iso-8859-8'],],# ditto
 		    'GB18030'       => [['gb18030',     'Encode::HanExtra'], ],
 		    'EUC-JISX0213'  => [['euc-jisx0213', 'Encode::JIS2K'], ],
 		    'ISO-2022-JP-3' => [['iso-2022-jp-3', 'Encode::JIS2K'], ],
@@ -405,7 +412,8 @@
 
 Get recommended transfer-encoding of CHARSET for message body.
 
-Returned value will be one of C<"B"> (BASE64), C<"Q"> (QUOTED-PRINTABLE) or
+Returned value will be one of C<"B"> (BASE64), C<"Q"> (QUOTED-PRINTABLE),
+C<"S"> (shorter one of either) or
 C<undef> (might not be transfer-encoded; either 7BIT or 8BIT).  This may
 not be same as encoding for message header.
 
@@ -441,6 +449,8 @@
 =item $charset->decoder
 
 Get L<"Encode::Encoding"> object to decode strings to Unicode by charset.
+If charset is not specified or not known by this module,
+undef will be returned.
 
 =cut
 
@@ -595,6 +605,12 @@
             $enc = '7BIT';
             $cset = 'US-ASCII';
         }
+    } elsif ($enc eq 'S') {
+	if (_enclen_B($encoded) < _enclen_Q($encoded, 1)) {
+	    $enc = 'B';
+	} else {
+	    $enc = 'Q';
+	}
     } elsif ($enc eq 'B') {
         $enc = 'BASE64';
     } elsif ($enc eq 'Q') {
@@ -729,9 +745,15 @@
     int((length(shift) + 2) / 3) * 4;
 }
 
-sub _enclen_Q($) {
+sub _enclen_Q($;$) {
     my $s = shift;
-    my @o = ($s =~ m{([^- !*+/0-9A-Za-z])}gos);
+    my $in_body = shift;
+    my @o;
+    if ($in_body) {
+	@o = ($s =~ m{([^-\t\r\n !*+/0-9A-Za-z])}go);
+    } else {
+	@o = ($s =~ m{([^- !*+/0-9A-Za-z])}gos);
+    }
     length($s) + scalar(@o) * 2;
 }
 
@@ -1026,7 +1048,8 @@
 C<undef> (might not be encoded).
 
 BODYENC is recommended transfer-encoding for message body.  It may be
-one of C<"B">, C<"Q"> or C<undef> (might not be transfer-encoded).
+one of C<"B">, C<"Q">, C<"S"> (shorter one of either) or
+C<undef> (might not be transfer-encoded).
 
 ENCCHARSET is a charset which is compatible with given CHARSET and
 is recommended to be used for MIME messages on Internet.
@@ -1135,6 +1158,49 @@
 Development versions of this module may be found at
 L<http://hatuka.nezumi.nu/repos/MIME-Charset/>.
 
+=head2 Incompatible Changes
+
+=over 4
+
+=item Release 1.001
+
+=over 4
+
+=item o
+
+new() method returns an object when CHARSET argument is not specified.
+
+=back
+
+=item Release 1.005
+
+=over 4
+
+=item o
+
+Restrict characters in encoded-word according to RFC 2047 section 5 (3).
+This also affects return value of encoded_header_len() method.
+
+=back
+
+=item Release 1.008
+
+=over 4
+
+=item o
+
+body_encoding() method may also returns C<"S">.
+
+=item o
+
+Return value of body_encode() method for UTF-8 may include
+C<"QUOTED-PRINTABLE"> encoding item that in earlier versions was fixed to
+C<"BASE64">.
+
+=back
+
+=back
+
 =head1 SEE ALSO
 
 Multipurpose Internet Mail Extensions (MIME).

Modified: trunk/libmime-charset-perl/Charset/JA_JP.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/Charset/JA_JP.pod?rev=46116&op=diff
==============================================================================
--- trunk/libmime-charset-perl/Charset/JA_JP.pod (original)
+++ trunk/libmime-charset-perl/Charset/JA_JP.pod Tue Oct 20 16:55:39 2009
@@ -129,7 +129,7 @@
 
 CHARSET のメッセージ本体で推奨される伝送エンコーディングを取得する。
 
-返値は C<"B"> (BASE64)、C<"Q"> (QUOTED-PRINTABLE)、
+返値は C<"B"> (BASE64)、C<"Q"> (QUOTED-PRINTABLE)、C<"S"> (どちらか短いほう)、
 C<undef> (伝送エンコードしなくてよい --- 7BIT か 8BIT)
 のいずれか。これはメッセージヘッダのエンコーディングとは違うこともある。
 
@@ -147,6 +147,7 @@
 
 キャラクタセットを Unicode に復号するのに使う
 L<"Encode::Encoding"> オブジェクトを返す。
+キャラクタセットが指定されていなかったか、当モジュールの知らないキャラクタセットであった場合は、undef 値を返す。
 
 =cut
 
@@ -409,7 +410,7 @@
 C<undef> (エンコードしなくてよい) を指定できる。
 
 BODYENC はメッセージ本体で推奨される伝送エンコーディング。
-C<"B">、C<"Q">、C<undef> (伝送エンコードしなくてよい) を指定できる。
+C<"B">、C<"Q">、C<"S"> (どちらか短くなるほう)、C<undef> (伝送エンコードしなくてよい) を指定できる。
 
 ENCCHARSET は、指定した CHARSET と互換で、インターネット上の
 MIME メッセージで使うことを推奨されるキャラクタセット名。
@@ -497,6 +498,48 @@
 このモジュールの開発版が
 L<http://hatuka.nezumi.nu/repos/MIME-Charset/> にある。
 
+=head2 非互換な変更
+
+=over 4
+
+=item リリース 1.001
+
+=over 4
+
+=item o
+
+new() メソッドは CHARSET 引数を指定しなくてもオブジェクトを返すようになった。
+
+=back
+
+=item リリース 1.005
+
+=over 4
+
+=item o
+
+encoded-word に含まれる文字種を RFC 2047 の 5 (3) 節のとおりにした。
+encoded_header_len() メソッドの返値も変わる。
+
+=back
+
+=item リリース 1.008
+
+=over 4
+
+=item o
+
+body_encoding() メソッドも C<"S"> を返せるようになった。
+
+=item o
+
+body_encode() メソッドの UTF-8 に対する返値のエンコーディング要素は、
+これまでのリリースでは C<"BASE64"> に固定だったが、C<"QUOTED-PRINTABLE"> になることがある。
+
+=back
+
+=back
+
 =head1 SEE ALSO
 
 Multipurpose Internet Mail Extensions (MIME).

Modified: trunk/libmime-charset-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/META.yml?rev=46116&op=diff
==============================================================================
--- trunk/libmime-charset-perl/META.yml (original)
+++ trunk/libmime-charset-perl/META.yml Tue Oct 20 16:55:39 2009
@@ -1,7 +1,7 @@
 --- #YAML:1.0
 name:         MIME-Charset
 abstract:     Charset Informations for MIME
-version:      1.007.1
+version:      1.008
 author:
   - Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>
 license:      perl
@@ -10,15 +10,15 @@
     Encode:                        1.98
     perl:                          5.005
 optional_features:
-- ja_extended:
+  ja_extended:
     description: Extended mappings by Japanese codepages
     requires:
         Encode::EUCJPASCII:        0.02
-- jis2000:
+  jis2000:
     description: Additional mappings for JIS X 0213:2000
     requires:
         Encode::JIS2K:             0.02
-- zh_extra:
+  zh_extra:
     description: Additional mappings for Chinese standards
     requires:
         Encode::HanExtra:          0.20
@@ -27,7 +27,7 @@
 provides:
     MIME::Charset:
         file:                      Charset.pm
-        version:                   1.007.1
+        version:                   1.008
 resources:
     repository: http://hatuka.nezumi.nu/repos/MIME-Charset/
 meta-spec:

Modified: trunk/libmime-charset-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/debian/changelog?rev=46116&op=diff
==============================================================================
--- trunk/libmime-charset-perl/debian/changelog (original)
+++ trunk/libmime-charset-perl/debian/changelog Tue Oct 20 16:55:39 2009
@@ -1,9 +1,14 @@
-libmime-charset-perl (1.007.1-2) UNRELEASED; urgency=low
+libmime-charset-perl (1.008-1) UNRELEASED; urgency=low
 
+  [ Jonathan Yu ]
+  * New upstream release
+  * Standards-Version 3.8.3 (drop perl version dependency)
+
+  [ Ryan Niebur ]
   * Update jawnsy's email address
   * Update ryan52's email address
 
- -- Ryan Niebur <ryan at debian.org>  Fri, 25 Sep 2009 00:25:28 -0700
+ -- Jonathan Yu <jawnsy at cpan.org>  Tue, 20 Oct 2009 09:21:36 -0400
 
 libmime-charset-perl (1.007.1-1) unstable; urgency=low
 

Modified: trunk/libmime-charset-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/debian/control?rev=46116&op=diff
==============================================================================
--- trunk/libmime-charset-perl/debian/control (original)
+++ trunk/libmime-charset-perl/debian/control Tue Oct 20 16:55:39 2009
@@ -2,9 +2,9 @@
 Section: perl
 Priority: optional
 Build-Depends: debhelper (>= 7)
-Build-Depends-Indep: perl (>= 5.8.8-7), libtest-pod-perl
+Build-Depends-Indep: perl, libtest-pod-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Standards-Version: 3.8.2
+Standards-Version: 3.8.3
 Homepage: http://search.cpan.org/dist/MIME-Charset/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libmime-charset-perl/
 Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libmime-charset-perl/




More information about the Pkg-perl-cvs-commits mailing list