r18842 - in /branches/upstream/libmime-charset-perl/current: Changes Charset.pm Charset/JA_JP.pod META.yml README
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Sat Apr 19 19:23:38 UTC 2008
Author: gregoa
Date: Sat Apr 19 19:23:37 2008
New Revision: 18842
URL: http://svn.debian.org/wsvn/?sc=1&rev=18842
Log:
[svn-upgrade] Integrating new upstream version, libmime-charset-perl (1.006.2)
Modified:
branches/upstream/libmime-charset-perl/current/Changes
branches/upstream/libmime-charset-perl/current/Charset.pm
branches/upstream/libmime-charset-perl/current/Charset/JA_JP.pod
branches/upstream/libmime-charset-perl/current/META.yml
branches/upstream/libmime-charset-perl/current/README
Modified: branches/upstream/libmime-charset-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libmime-charset-perl/current/Changes?rev=18842&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/Changes (original)
+++ branches/upstream/libmime-charset-perl/current/Changes Sat Apr 19 19:23:37 2008
@@ -1,14 +1,23 @@
-2008-XX-XX Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
- * Release 1.0XX.
- * Bug Fix: CPAN RT #34909: Test failures (fixed at 1.006.1).
+2008-04-17 Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
+
+ * Release 1.006.2 - bug fixes only; no new features.
+ * Bug Fix: Perl >= 5.8.1: CPAN RT #34909: Test failures.
+ * Bug Fix: Perl >= 5.10.0: CPAN RT #35070: HZ words are
+ encoded as US-ASCII; added workaround for CPAN RT #35120.
+ * Fix: Perl 5.11.0: Suppress ``Use of uninitialized value
+ within @_ in uc'' warnings.
+ * JA_JP.pod: Clarify distinction between ``符å·å'' (on
+ charset) and ``ã¨ã³ã³ã¼ã'' (on encoding).
2008-04-12 Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
+
* Release 1.006.
* Workarounds for ``US-ASCII transformation'' charsets
i.e. HZ-GB-2312 (RFC1842) and UTF-7 (RFC 2152).
* Added tests.
2008-04-07 Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
+
* Release 1.005.
* _enclen_Q(): Restrict characters in encoded-word
according to RFC 2047 section 5 (3).
@@ -17,6 +26,7 @@
US-ASCII: Works on pre-Encode environments.
2008-03-30 Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
+
* Release 1.004.
* Added ESTI GSM 03.38 which won't be used for MIME
messages (experimental).
@@ -27,6 +37,7 @@
* Bug Fix: Perl <=5.005: our is ``withdrawn''.
2008-03-20 Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
+
* Release 1.002.
* New method undecode().
* encoder(): added argument to set instance.
Modified: branches/upstream/libmime-charset-perl/current/Charset.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libmime-charset-perl/current/Charset.pm?rev=18842&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/Charset.pm (original)
+++ branches/upstream/libmime-charset-perl/current/Charset.pm Sat Apr 19 19:23:37 2008
@@ -121,7 +121,7 @@
}
}
-$VERSION = '1.006.1';
+$VERSION = '1.006.2';
######## Private Attributes ########
@@ -359,7 +359,7 @@
}
sub _find_encoder($$) {
- my $charset = uc(shift);
+ my $charset = uc(shift || "");
return undef unless $charset;
my $mapping = uc(shift);
my ($spec, $name, $module, $encoder);
@@ -427,7 +427,7 @@
=item $charset->decoder
-Get L<"Encode::Encoding"> object to decode strings by charset.
+Get L<"Encode::Encoding"> object to decode strings to Unicode by charset.
=cut
@@ -609,7 +609,7 @@
Encode STRING (Unicode or non-Unicode) using compatible charset recommended
to be used for messages on Internet (if this module knows it).
-Note that string will be decoded then encoded even if compatible charset
+Note that string will be decoded to Unicode then encoded even if compatible charset
was equal to original charset.
B<Note>:
@@ -626,7 +626,9 @@
unless (is_utf8($s) or $s =~ /[^\x00-\xFF]/) {
$s = $self->{Decoder}->decode($s, ($check & 0x1)? FB_CROAK(): 0);
}
- $self->{Encoder}->encode($s, $check);
+ my $enc = $self->{Encoder}->encode($s, $check);
+ Encode::_utf8_off($enc); # workaround for RT #35120
+ $enc;
}
=item $charset->encoded_header_len(STRING [, ENCODING])
@@ -646,7 +648,7 @@
my ($encoding, $s);
if (ref $self) {
$s = shift;
- $encoding = uc(shift) || $self->{HeaderEncoding};
+ $encoding = uc(shift || $self->{HeaderEncoding});
} else {
$s = $self;
$encoding = uc(shift);
@@ -807,11 +809,13 @@
Mapping => 'STANDARD');
# croak unknown charset
croak "unknown charset ``$FALLBACK_CHARSET''"
- unless $charset->{Decoder};
- # charset transformation
+ unless $cset->{Decoder};
+ # charset translation
+ $charset = $charset->dup;
$charset->encoder($cset);
$encoded = $s;
$encoded = $charset->encode($encoded, 0);
+ # replace input & output charsets with fallback charset
$cset->encoder($cset);
$charset = $cset;
} else {
@@ -829,22 +833,20 @@
if ($encoded !~ /$NONASCIIRE/) { # maybe ASCII
# check ``ASCII transformation'' charsets
- if ($charset->{OutputCharset} =~ /^($ASCIITRANSRE)$/ and
- $encoded =~ /[+~]/) {
+ if ($charset->{OutputCharset} =~ /^($ASCIITRANSRE)$/) {
my $u = $encoded;
- if ($charset->encoder) {
+ if (USE_ENCODE) {
$u = $charset->encoder->decode($encoded); # dec. by output
- } elsif (!USE_ENCODE) { # workaround for pre-Encode environment
+ } elsif ($encoded =~ /[+~]/) { # workaround for pre-Encode env.
$u = "x$u";
- } else { # NOTREACHED
- croak __PACKAGE__.": bug in _text_encode. Report developer.";
}
- $charset->encoder(__PACKAGE__->new($DEFAULT_CHARSET,
- Mapping => 'STANDARD'))
- if $u eq $encoded;
+ if ($u eq $encoded) {
+ $charset = $charset->dup;
+ $charset->encoder($DEFAULT_CHARSET);
+ }
} elsif ($charset->{OutputCharset} ne "US-ASCII") {
- $charset->encoder(__PACKAGE__->new($DEFAULT_CHARSET,
- Mapping => 'STANDARD'));
+ $charset = $charset->dup;
+ $charset->encoder($DEFAULT_CHARSET);
}
}
@@ -861,7 +863,7 @@
my ($seq, $cset) = @$_;
if (index($s, $seq) >= 0) {
my $decoder = __PACKAGE__->new($cset);
- next unless $decoder and $decoder->{Decoder};
+ next unless $decoder->{Decoder};
eval {
my $dummy = $s;
$decoder->decode($dummy, FB_CROAK());
@@ -893,7 +895,9 @@
my $self = shift;
my $s = shift;
my $check = shift || 0;
- $self->{Decoder}->encode($s, $check);
+ my $enc = $self->{Decoder}->encode($s, $check);
+ Encode::_utf8_off($enc); # workaround for RT #35120
+ $enc;
}
=head2 Manipulating Module Defaults
Modified: branches/upstream/libmime-charset-perl/current/Charset/JA_JP.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libmime-charset-perl/current/Charset/JA_JP.pod?rev=18842&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/Charset/JA_JP.pod (original)
+++ branches/upstream/libmime-charset-perl/current/Charset/JA_JP.pod Sat Apr 19 19:23:37 2008
@@ -79,7 +79,7 @@
B<ãã£ã©ã¯ã¿ã»ãã> ã¨ã¯ãMIME ã§ã® ``character set'' ã®ãã¨ã§ã
ãªã¯ãããã®åãæåã®åã«å¤æããæ¹æ³ãæãã
ããã¯ãISO/IEC ã«ããã ``符å·åæåéå'' (CCS) ã¨
-``æå符ååæ³'' (CES) ã®ä¸¡æ¹ã®æ¦å¿µãå
å«ããã
+``æå符å·åæ³'' (CES) ã®ä¸¡æ¹ã®æ¦å¿µãå
å«ããã
B<ã¨ã³ã³ã¼ãã£ã³ã°> ã¨ã¯ãMIME ã§ã®ããã®ãã¨ã§ã
ã¡ãã»ã¼ã¸æ¬ä½ãã¡ãã»ã¼ã¸ãããæ¬ä½ãå°åå¯è½ãª
@@ -138,7 +138,7 @@
=item $charset->decoder
-ãã£ã©ã¯ã¿ã»ããããã³ã¼ãããã®ã«ä½¿ã
+ãã£ã©ã¯ã¿ã»ããã Unicode ã«å¾©å·ããã®ã«ä½¿ã
L<"Encode::Encoding"> ãªãã¸ã§ã¯ããè¿ãã
=cut
@@ -152,10 +152,10 @@
=item $charset->encoder([CHARSET])
ã¤ã³ã¿ã¼ãããä¸ã® MIME
-ã¡ãã»ã¼ã¸ã§ä½¿ããã¨ãæ¨å¥¨ãããäºæãã£ã©ã¯ã¿ã»ããã§ã¨ã³ã³ã¼ãããã®ã«ä½¿ã
+ã¡ãã»ã¼ã¸ã§ä½¿ããã¨ãæ¨å¥¨ãããäºæãã£ã©ã¯ã¿ã»ããã§ç¬¦å·åããã®ã«ä½¿ã
L<"Encode::Encoding"> ãªãã¸ã§ã¯ããè¿ãã
-CHARSET å¼æ°ãæå®ããå ´åã$charset ãªãã¸ã§ã¯ãã®ã¨ã³ã³ã¼ã
+CHARSET å¼æ°ãæå®ããå ´åã$charset ãªãã¸ã§ã¯ãã®ç¬¦å·åå¨
(ããã³åºåãã£ã©ã¯ã¿ã»ããå) ããCHARSET ã®ããã«ç½®ãæããã
ã¤ã¾ãã$charset ãªãã¸ã§ã¯ãã¯å
ã®ãã£ã©ã¯ã¿ã»ããããæ°ããª
CHARSET ã¸ã®å¤æå¨ã¨ãªãã
@@ -232,7 +232,7 @@
=item $charset->decode(STRING [,CHECK])
-STRING ã Unicode æååã«ãã³ã¼ãããã
+STRING ã Unicode æååã«å¾©å·ããã
B<NOTE>:
Unicode/ãã«ããã¤ã対å¿ãæå¹ã«ãªã£ã¦ããªãã¨ã (L<"USE_ENCODE"> åç
§) ã¯ã
@@ -245,9 +245,9 @@
STRING (Unicode æååã¾ãã¯æ®éã®æåå) ãã
å
ã®ãã£ã©ã¯ã¿ã»ããã¨äºæã§ã¤ã³ã¿ã¼ãããä¸ã®
MIME ã¡ãã»ã¼ã¸ã§ä½¿ããã¨ãæ¨å¥¨ããããã£ã©ã¯ã¿ã»ããã
-(å½ã¢ã¸ã¥ã¼ã«ãç¥ã£ã¦ããã°) 使ã£ã¦ãã¨ã³ã³ã¼ãããã
+(å½ã¢ã¸ã¥ã¼ã«ãç¥ã£ã¦ããã°) 使ã£ã¦ã符å·åããã
å
ã®ãã£ã©ã¯ã¿ã»ããã¨äºæãã£ã©ã¯ã¿ã»ãããåãã§ãã
-æååããã³ã¼ããã¦ããã¨ã³ã³ã¼ããããã¨ã«æ³¨æã
+æååã Unicode ã«å¾©å·ãã¦ãã符å·åãããã¨ã«æ³¨æã
B<NOTE>:
Unicode/ãã«ããã¤ã対å¿ãæå¹ã«ãªã£ã¦ããªãã¨ã (L<"USE_ENCODE"> åç
§) ã¯ã
@@ -300,7 +300,7 @@
ã®ããããã
I<åºåã®ãã£ã©ã¯ã¿ã»ãã> ã決å®ã§ãããI<å¤æãã¿ã®æåå>
ã ASCII以å¤ã®ãã¤ããå«ãã¨ãã¯ãI<åºåã®ãã£ã©ã¯ã¿ã»ãã> 㯠C<"8BIT">
-(ããã¯ãã£ã©ã¯ã¿ã»ããã®ååã§ã¯I<ãªã>ãã¨ã³ã³ã¼ãä¸å¯è½ãªãã¼ã¿ã表ãç¹æ®å¤)
+(ããã¯ãã£ã©ã¯ã¿ã»ããã®ååã§ã¯I<ãªã>ã符å·åãä¸å¯è½ãªãã¼ã¿ã表ãç¹æ®å¤)
㧠I<ã¨ã³ã³ã¼ãã£ã³ã°æ³> 㯠C<undef> (ã¨ã³ã³ã¼ãããã¹ãã§ã¯ãªã) ã¨ãªãã
I<åºåã®ãã£ã©ã¯ã¿ã»ãã> ã C<"US-ASCII">
ã¨ãªãã®ã¯ãæååã ASCII以å¤ã®ãã¤ããå«ã¾ãªãã¨ãã«éãã
@@ -424,7 +424,7 @@
=item C<"DEFAULT">
ä¸æ£ãªæåãç½®ãæãæåã§ç½®ãæããã
-UCM ã«åºã¥ãã¨ã³ã³ã¼ããæã¤ãã£ã©ã¯ã¿ã»ããã§ã¯ <subchar> ã使ããã¨ãããã
+UCM ã«åºã¥ã符å·åå¨ãæã¤ãã£ã©ã¯ã¿ã»ããã§ã¯ <subchar> ã使ããã¨ãããã
=item C<"FALLBACK">
Modified: branches/upstream/libmime-charset-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libmime-charset-perl/current/META.yml?rev=18842&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/META.yml (original)
+++ branches/upstream/libmime-charset-perl/current/META.yml Sat Apr 19 19:23:37 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-Charset
-version: 1.006.1
+version: 1.006.2
version_from: Charset.pm
installdirs: site
requires:
Modified: branches/upstream/libmime-charset-perl/current/README
URL: http://svn.debian.org/wsvn/branches/upstream/libmime-charset-perl/current/README?rev=18842&op=diff
==============================================================================
--- branches/upstream/libmime-charset-perl/current/README (original)
+++ branches/upstream/libmime-charset-perl/current/README Sat Apr 19 19:23:37 2008
@@ -107,7 +107,8 @@
Get canonical name for charset.
$charset->decoder
- Get "Encode::Encoding" object to decode strings by charset.
+ Get "Encode::Encoding" object to decode strings to Unicode by
+ charset.
$charset->dup
Get a copy of charset object.
@@ -174,8 +175,8 @@
$charset->encode(STRING [,CHECK])
Encode STRING (Unicode or non-Unicode) using compatible charset
recommended to be used for messages on Internet (if this module
- knows it). Note that string will be decoded then encoded even if
- compatible charset was equal to original charset.
+ knows it). Note that string will be decoded to Unicode then encoded
+ even if compatible charset was equal to original charset.
Note: When Unicode/multibyte support is disabled (see "USE_ENCODE"),
this function will die.
More information about the Pkg-perl-cvs-commits
mailing list