r17755 - in /branches/upstream/libmime-encwords-perl/current: Changes EncWords.pm META.yml README

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Mon Mar 17 19:38:28 UTC 2008


Author: gregoa-guest
Date: Mon Mar 17 19:38:28 2008
New Revision: 17755

URL: http://svn.debian.org/wsvn/?sc=1&rev=17755
Log:
[svn-upgrade] Integrating new upstream version, libmime-encwords-perl (1.005)

Modified:
    branches/upstream/libmime-encwords-perl/current/Changes
    branches/upstream/libmime-encwords-perl/current/EncWords.pm
    branches/upstream/libmime-encwords-perl/current/META.yml
    branches/upstream/libmime-encwords-perl/current/README

Modified: branches/upstream/libmime-encwords-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libmime-encwords-perl/current/Changes?rev=17755&op=diff
==============================================================================
--- branches/upstream/libmime-encwords-perl/current/Changes (original)
+++ branches/upstream/libmime-encwords-perl/current/Changes Mon Mar 17 19:38:28 2008
@@ -1,6 +1,13 @@
 2008-03-16	Hatuka*nezumi - IKEDA Soji	<hatuka at nezumi.nu>
 
-	* Release 1.004.
+	* Release 1.005.
+	* Fix: Injected bug on _UNICODE_ conversion.
+	* Fix: decode_mimewords(): line folding of encoded text
+	  is preserved in the result.
+
+2008-03-16	Hatuka*nezumi - IKEDA Soji	<hatuka at nezumi.nu>
+
+	* Release 1.004 - withdrawn.
 	* By this release we require OO interface of MIME::Charset
 	  1.001 or later.
 	* Fix: encode_mimewords(): Newlines were encoded when

Modified: branches/upstream/libmime-encwords-perl/current/EncWords.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libmime-encwords-perl/current/EncWords.pm?rev=17755&op=diff
==============================================================================
--- branches/upstream/libmime-encwords-perl/current/EncWords.pm (original)
+++ branches/upstream/libmime-encwords-perl/current/EncWords.pm Mon Mar 17 19:38:28 2008
@@ -120,7 +120,7 @@
 #------------------------------
 
 ### The package version, both in 1.23 style *and* usable by MakeMaker:
-$VERSION = '1.004';
+$VERSION = '1.005';
 
 ### Public Configuration Attributes
 our $Config = {
@@ -302,6 +302,9 @@
                             }xgi) {
 	    ($word, $charset, $encoding, $enc) = ($&, $1, lc($2), $3);
 	    my $tspc = $4;
+	    # unfold
+	    $tspc =~ s/(?:\r?\n|\r)([\t ])/$1/g;
+	    $tspc =~ s/\r?\n|\r/ /g;
 
 	    # RFC 2231 section 5 extension
 	    if ($charset =~ s/^([^\*]*)\*(.*)/$1/) {
@@ -375,7 +378,6 @@
 	    unless ($t->[1]) {
 		my $charset = &MIME::Charset::_detect_7bit_charset($t->[0]);
 		if ($charset and $charset ne &MIME::Charset::default()) {
-		    $t->[0] =~ s/[\r\n\t ]+/ /g;
 		    $t->[1] = $charset;
 		}
 	    }
@@ -414,17 +416,14 @@
     $charset->{OutputCharset} = $cset->as_string;
     $charset->{Encoder} = $cset->decoder;
 
-    my $converted;
+    my $converted = $s;
     if (is_utf8($s) or $s =~ $WIDECHAR) {
-	if ($charset->output_charset eq "_UNICODE_") {
-	    $converted = $s;
-	} else {
+	if ($charset->output_charset ne "_UNICODE_") {
 	    $converted = $charset->encode($s);
 	}
     } elsif ($charset->output_charset eq "_UNICODE_") {
 	if (!$charset->decoder) {
 	    if ($s =~ $UNSAFE) {
-		$converted = $s;
 		$@ = '';
 		eval {
 		    $converted = decode("UTF-8", $converted, FB_CROAK());
@@ -439,8 +438,6 @@
 	}
     } elsif ($charset->decoder) {
 	$converted = $charset->encode($s);
-    } else {
-	$converted = $s;
     }
 
     $@ = $preserveerr;
@@ -523,7 +520,7 @@
 care of character boundaries of multibyte sequences when Unicode/multibyte
 support is enabled.
 Portions for unencoded data should include surrounding whitespace(s), or
-they will be merged into adjoining encoded word(s).
+they will be merged into adjoining encoded-word(s).
 
 Any arguments past the RAW string are taken to define a hash of options:
 
@@ -553,7 +550,7 @@
 charset is recommended: see L<MIME::Charset>);
 C<"s"> will choose shorter one of either C<"q"> or C<"b">.
 B<NOTE>
-As of release 1.004, The default was changed from C<"q">
+As of release 1.005, The default was changed from C<"q">
 (the default on MIME::Words) to C<"a">.
 
 =item Field

Modified: branches/upstream/libmime-encwords-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libmime-encwords-perl/current/META.yml?rev=17755&op=diff
==============================================================================
--- branches/upstream/libmime-encwords-perl/current/META.yml (original)
+++ branches/upstream/libmime-encwords-perl/current/META.yml Mon Mar 17 19:38:28 2008
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         MIME-EncWords
-version:      1.004
+version:      1.005
 version_from: EncWords.pm
 installdirs:  site
 requires:

Modified: branches/upstream/libmime-encwords-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libmime-encwords-perl/current/README?rev=17755&op=diff
==============================================================================
--- branches/upstream/libmime-encwords-perl/current/README (original)
+++ branches/upstream/libmime-encwords-perl/current/README Mon Mar 17 19:38:28 2008
@@ -6,8 +6,8 @@
     that it will achive more exact conformance with RFC 2047 (former RFC
     1522) specifications. Additionally, it contains some improvements.
     Following synopsis and descriptions are inherited from its inspirer,
-    then added descriptions on improvements (‡) or changes and
-    clarifications (†).*
+    then added descriptions on improvements (**) or changes and
+    clarifications (*).*
 
     Before reading further, you should see MIME::Tools to make sure that you
     understand where this module fits into the grand scheme of things. Go
@@ -83,10 +83,10 @@
                 print "", ($_[1] || 'US-ASCII'), ": ", $_[0], "\n";
             }
 
-        ‡ However, adjacent encoded-words with same charset will be
+        ** However, adjacent encoded-words with same charset will be
         concatenated to handle multibyte sequences safely.
 
-        † Whitespaces surrounding unencoded data will not be stripped so
+        * Whitespaces surrounding unencoded data will not be stripped so
         that compatibility with MIME::Words will be ensured.
 
         In a scalar context, joins the "data" elements of the above list
@@ -94,22 +94,23 @@
         and probably *not* what you want, but if you know that all charsets
         in the ENCODED string are identical, it might be useful to you.
         (Before you use this, please see "unmime" in MIME::WordDecoder,
-        which is probably what you want.) ‡ See also "Charset" option below.
+        which is probably what you want.) ** See also "Charset" option
+        below.
 
         In the event of a syntax error, $@ will be set to a description of
         the error, but parsing will continue as best as possible (so as to
         get *something* back when decoding headers). $@ will be false if no
         error was detected.
 
-        † Malformed base64 encoded-words will be kept encoded. In this case
+        * Malformed base64 encoded-words will be kept encoded. In this case
         $@ will be set.
 
         Any arguments past the ENCODED string are taken to define a hash of
-        options. ‡ When Unicode/multibyte support is disabled (see
+        options. ** When Unicode/multibyte support is disabled (see
         "USE_ENCODE" in MIME::Charset), these options will not have any
         effects.
 
-        Charset ‡
+        Charset **
             Name of character set by which data elements in scalar context
             will be converted. If this option is specified as special value
             "_UNICODE_", returned value will be Unicode string.
@@ -117,12 +118,14 @@
             Note: This feature is still information-lossy, *except* when
             "_UNICODE_" is specified.
 
-        Detect7bit ‡
+        Detect7bit **
             Try to detect 7-bit charset on unencoded portions. Default is
-            "YES". Note: This feature was introduced at release 1.000.
-
-        Mapping ‡
-            NOT YET IMPLEMENTED
+            "YES".
+
+        Mapping **
+            In scalar context, specify mappings actually used for charset
+            names. "EXTENDED" uses extended mappings. "STANDARD" uses
+            standardized strict mappings. Default is "EXTENDED".
 
     encode_mimeword RAW, [ENCODING], [CHARSET]
         *Function.* Encode a single RAW "word" that has unsafe characters.
@@ -131,13 +134,13 @@
             ### Encode "<<Franc,ois>>":
             $encoded = encode_mimeword("\xABFran\xE7ois\xBB");
 
-        You may specify the ENCODING ("Q" or "B"), which defaults to "Q". ‡
+        You may specify the ENCODING ("Q" or "B"), which defaults to "Q". **
         You may also specify it as ``special'' value: "S" to choose shorter
         one of either "Q" or "B".
 
         You may specify the CHARSET, which defaults to "iso-8859-1".
 
-        † Spaces will be escaped with ``_'' by "Q" encoding.
+        * Spaces will be escaped with ``_'' by "Q" encoding.
 
     encode_mimewords RAW, [OPTS]
         *Function.* Given a RAW string, try to find and encode all "unsafe"
@@ -148,11 +151,18 @@
 
         Returns the encoded string.
 
-        ‡ RAW may be a Unicode string when Unicode/multibyte support is
+        ** RAW may be a Unicode string when Unicode/multibyte support is
         enabled (see "USE_ENCODE" in MIME::Charset). Furthermore, RAW may be
         a reference to that returned by "decode_mimewords" on array context.
         In latter case "Charset" option (see below) will be overridden (see
-        also notes below).
+        also a note below).
+
+        Note: * When RAW is an arrayref, adjacent encoded-words (i.e.
+        elements having non-ASCII charset element) are concatenated. Then
+        they are splitted taking care of character boundaries of multibyte
+        sequences when Unicode/multibyte support is enabled. Portions for
+        unencoded data should include surrounding whitespace(s), or they
+        will be merged into adjoining encoded-word(s).
 
         Any arguments past the RAW string are taken to define a hash of
         options:
@@ -161,7 +171,7 @@
             Encode all unsafe stuff with this charset. Default is
             'ISO-8859-1', a.k.a. "Latin-1".
 
-        Detect7bit ‡
+        Detect7bit **
             When "Encoding" option (see below) is specified as "a" and
             "Charset" option is unknown, try to detect 7-bit charset on
             given RAW string. Default is "YES". When Unicode/multibyte
@@ -169,22 +179,27 @@
             "USE_ENCODE" in MIME::Charset).
 
         Encoding
-            The encoding to use, "q" or "b". ‡ You may also specify
+            The encoding to use, "q" or "b". ** You may also specify
             ``special'' values: "a" will automatically choose recommended
             encoding to use (with charset conversion if alternative charset
             is recommended: see MIME::Charset); "s" will choose shorter one
-            of either "q" or "b". NOTE As of release 1.004, The default was
-            changed from "q" (it is also the default on MIME::Words) to "a".
+            of either "q" or "b". NOTE As of release 1.005, The default was
+            changed from "q" (the default on MIME::Words) to "a".
 
         Field
-            Name of the mail field this string will be used in. ‡ Length of
+            Name of the mail field this string will be used in. ** Length of
             mail field name will be considered in the first line of encoded
             header.
 
-        Mapping ‡
-            NOT YET IMPLEMENTED
-
-        Minimal ‡
+        Mapping **
+            Specify mappings actually used for charset names. "EXTENDED"
+            uses extended mappings. "STANDARD" uses standardized strict
+            mappings. Default is "EXTENDED".
+
+        MaxLineLen **
+            Maximum line length excluding newline. The default is 76.
+
+        Minimal **
             Takes care of natural word separators (i.e. whitespaces) in the
             text to be encoded. If "NO" is specified, this module will
             encode whole text (if encoding needed) not regarding
@@ -195,19 +210,11 @@
             ensure compatibility with MIME::Words. On earlier releases, this
             option was fixed to be "NO".
 
-        Replacement ‡
-            See "ERROR HANDLING" in MIME::Charset. Note: This feature was
-            introduced at release 1.000.
-
-        Notes on improvement by this module: When RAW is an arrayref,
-        adjacent encoded-words are concatenated. Then they are splitted
-        taking care of character boundaries of multibyte sequences, when
-        Unicode/multibyte support is enabled. Portions for unencoded data
-        should include surrounding whitespace(s), or they will be merged
-        into adjoining encoded word(s).
+        Replacement **
+            See "Error Handling" in MIME::Charset.
 
   Configuration Files
-‡
+**
     Built-in defaults of option parameters for "decode_mimewords" and
     "encode_mimewords" can be overridden by configuration files:
     MIME/Charset/Defaults.pm and MIME/EncWords/Defaults.pm. For more details




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