r59568 - in /branches/upstream/libmime-encwords-perl/current: Changes EncWords.pm EncWords/JA_JP.pod META.yml README
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Sat Jun 19 00:16:11 UTC 2010
Author: ansgar-guest
Date: Sat Jun 19 00:15:21 2010
New Revision: 59568
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=59568
Log:
[svn-upgrade] new version libmime-encwords-perl (1.012)
Modified:
branches/upstream/libmime-encwords-perl/current/Changes
branches/upstream/libmime-encwords-perl/current/EncWords.pm
branches/upstream/libmime-encwords-perl/current/EncWords/JA_JP.pod
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/pkg-perl/branches/upstream/libmime-encwords-perl/current/Changes?rev=59568&op=diff
==============================================================================
--- branches/upstream/libmime-encwords-perl/current/Changes (original)
+++ branches/upstream/libmime-encwords-perl/current/Changes Sat Jun 19 00:15:21 2010
@@ -1,3 +1,9 @@
+2010-06-17 Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
+
+ * Release 1.012.
+ * encode_mimewords(): New option Minimal => 'DISPNAME' to help
+ encoding RFC5322 name-addr.
+
2009-06-16 Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
* Release 1.011.1 - no new features.
Modified: branches/upstream/libmime-encwords-perl/current/EncWords.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-encwords-perl/current/EncWords.pm?rev=59568&op=diff
==============================================================================
--- branches/upstream/libmime-encwords-perl/current/EncWords.pm (original)
+++ branches/upstream/libmime-encwords-perl/current/EncWords.pm Sat Jun 19 00:15:21 2010
@@ -121,7 +121,7 @@
#------------------------------
### The package version, both in 1.23 style *and* usable by MakeMaker:
-$VERSION = '1.011.1';
+$VERSION = '1.012';
### Public Configuration Attributes
$Config = {
@@ -137,13 +137,13 @@
### Private Constants
-### Nonprintables (controls + x7F + 8bit):
+my $PRINTABLE = "\\x21-\\x7E";
#my $NONPRINT = "\\x00-\\x1F\\x7F-\\xFF";
-my $PRINTABLE = "\\x21-\\x7E";
my $NONPRINT = qr{[^$PRINTABLE]}; # Improvement: Unicode support.
my $UNSAFE = qr{[^\x01-\x20$PRINTABLE]};
my $WIDECHAR = qr{[^\x00-\xFF]};
my $ASCIITRANS = qr{^(?:HZ-GB-2312|UTF-7)$}i;
+my $DISPNAMESPECIAL = "\\x22(),:;<>\\x40\\x5C"; # RFC5322 name-addr specials.
#------------------------------
@@ -625,13 +625,20 @@
(if encoding needed) not regarding whitespaces;
encoded-words exceeding line length will be splitted based only on their
lengths.
-Default is C<"YES">.
+Default is C<"YES"> by which minimal portions of text are encoded.
+If C<"DISPNAME"> is specified, portions including special characters
+described in RFC5322 (former RFC2822, RFC822) address specification
+(section 3.4) are also encoded.
+This is useful for encoding display-name of address fields.
B<Note>:
As of release 0.040, default has been changed to C<"YES"> to ensure
compatibility with MIME::Words.
On earlier releases, this option was fixed to be C<"NO">.
+B<Note>:
+C<"DISPNAME"> option was introduced at release 1.012.
+
=item Replacement
B<**>
@@ -645,10 +652,11 @@
my $words = shift;
my %params = @_;
my %Params = &_getparams(\%params,
- YesNo => [qw(Detect7bit Minimal)],
+ YesNo => [qw(Detect7bit)],
Others => [qw(Charset Encoding Field Folding
- Mapping MaxLineLen Replacement)],
- ToUpper => [qw(Charset Encoding Mapping
+ Mapping MaxLineLen Minimal
+ Replacement)],
+ ToUpper => [qw(Charset Encoding Mapping Minimal
Replacement)],
);
croak "unsupported encoding ``$Params{Encoding}''"
@@ -671,9 +679,18 @@
my $firstlinelen = $Params{MaxLineLen} -
($Params{Field}? length("$Params{Field}: "): 0);
my $maxrestlen = $Params{MaxLineLen} - length($fwsspc);
+ # minimal encoding flag
+ if (!$Params{Minimal}) {
+ $Params{Minimal} = 'NO';
+ } elsif ($Params{Minimal} !~ /^(NO|DISPNAME)$/) {
+ $Params{Minimal} = 'YES';
+ }
+ # unsafe ASCII sequences
my $UNSAFEASCII = ($maxrestlen <= 1)?
qr{(?: =\? )}ox:
qr{(?: =\? | [$PRINTABLE]{$Params{MaxLineLen}} )}ox;
+ $UNSAFEASCII = qr{(?: [$DISPNAMESPECIAL] | $UNSAFEASCII )}ox
+ if $Params{Minimal} eq 'DISPNAME';
unless (ref($words) eq "ARRAY") {
my @words = ();
@@ -681,7 +698,7 @@
$words =~ s/(?:[\r\n]+[\t ])*[\r\n]+([\t ]|\Z)/$1? " ": ""/eg;
$words =~ s/[\r\n]+/ /g;
# split if required
- if ($Params{Minimal} eq "YES") {
+ if ($Params{Minimal} =~ /YES|DISPNAME/) {
my ($spc, $unsafe_last) = ('', 0);
foreach my $w (split(/([\t ]+)/, $words)) {
next unless scalar(@words) or length($w); # skip garbage
Modified: branches/upstream/libmime-encwords-perl/current/EncWords/JA_JP.pod
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-encwords-perl/current/EncWords/JA_JP.pod?rev=59568&op=diff
==============================================================================
--- branches/upstream/libmime-encwords-perl/current/EncWords/JA_JP.pod (original)
+++ branches/upstream/libmime-encwords-perl/current/EncWords/JA_JP.pod Sat Jun 19 00:15:21 2010
@@ -294,15 +294,22 @@
ã¨ã³ã³ã¼ãããããã¹ãã®ä¸ã®èªç¶ãªèªåé¢å (è¦ããã«ç©ºç½æå)
ã«æ³¨æãæãã
-C<"NO"> ãæå®ããã¨ããã®ã¢ã¸ã¥ã¼ã«ã¯ããã¹ããã¾ã¨ãã¦ã¨ã³ã³ã¼ã
-(ã¨ã³ã³ã¼ããå¿
è¦ãªã) ããç©ºç½æåãèæ
®ããªãã
-è¡é·ãè¶
ãããencoded-wordãã¯åã«ãã®é·ãã«ãã£ã¦åå²ãããã
-åæå¤ã¯ C<"YES">ã
+C<"NO"> ãæå®ããã¨ã
+ãã®ã¢ã¸ã¥ã¼ã«ã¯ç©ºç½æåãèæ
®ããã«ããã¹ãå
¨ä½ãã¨ã³ã³ã¼ã
+(ã¨ã³ã³ã¼ããå¿
è¦ãªã)
+ããè¡é·ãè¶
ãããencoded-wordãã¯åã«ãã®é·ãã«ãã£ã¦åå²ãããã
+åæå¤ã¯ C<"YES"> ã§ãæå°éã®é¨åã ãã¨ã³ã³ã¼ãããã
+C<"DISPNAME"> ãæå®ããã¨ãRFC5322 (æ§ RFC2822ãRFC822)
+ã®ã¢ãã¬ã¹ä»æ§ (3.4ç¯) ã§è¿°ã¹ã¦ããç¹æ®æåãå«ãé¨åãã¨ã³ã³ã¼ãããã
+ããã¯ã¢ãã¬ã¹ãã£ã¼ã«ãä¸ã® display-name ãã¨ã³ã³ã¼ãããéã«æç¨ã§ããã
B<Note>:
ãªãªã¼ã¹ 0.040 ã§ãåæå¤ã C<"YES"> ã«å¤ãã£ãã
MIME::Words ã¨ã®äºææ§ãä¿ã¤ããã§ããã
ãã以åã®ãªãªã¼ã¹ã§ã¯ããã®ãªãã·ã§ã³ã¯ C<"NO"> åºå®ã§ãã£ãã
+
+B<Note>:
+C<"DISPNAME"> ã¯ãªãªã¼ã¹ 1.012 ã§å°å
¥ãããã
=item Replacement
B<**>
Modified: branches/upstream/libmime-encwords-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-encwords-perl/current/META.yml?rev=59568&op=diff
==============================================================================
--- branches/upstream/libmime-encwords-perl/current/META.yml (original)
+++ branches/upstream/libmime-encwords-perl/current/META.yml Sat Jun 19 00:15:21 2010
@@ -1,7 +1,7 @@
--- #YAML:1.0
name: MIME-EncWords
abstract: deal with RFC 2047 encoded words (improved)
-version: 1.011.1
+version: 1.012
author:
- Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
license: perl
@@ -16,7 +16,7 @@
provides:
MIME::EncWords:
file: EncWords.pm
- version: 1.011.1
+ version: 1.012
resources:
repository: http://hatuka.nezumi.nu/repos/MIME-EncWords/
meta-spec:
Modified: branches/upstream/libmime-encwords-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libmime-encwords-perl/current/README?rev=59568&op=diff
==============================================================================
--- branches/upstream/libmime-encwords-perl/current/README (original)
+++ branches/upstream/libmime-encwords-perl/current/README Sat Jun 19 00:15:21 2010
@@ -1,6 +1,6 @@
MIME-EncWords Package.
-Copyright (C) 2006-2009 by Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>.
+Copyright (C) 2006-2010 by Hatuka*nezumi - IKEDA Soji <hatuka(at)nezumi.nu>.
This package is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
More information about the Pkg-perl-cvs-commits
mailing list