r17941 - in /trunk/libmime-charset-perl: Changes Charset-ja_JP.pod Charset.pm Charset/JA_JP.pod MANIFEST META.yml README debian/changelog debian/rules
rmayorga-guest at users.alioth.debian.org
rmayorga-guest at users.alioth.debian.org
Mon Mar 24 05:48:38 UTC 2008
Author: rmayorga-guest
Date: Mon Mar 24 05:48:37 2008
New Revision: 17941
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=17941
Log:
* New upstream release
* Remove make test call from install-stamp target (test suites
was called two times)
Added:
trunk/libmime-charset-perl/Charset/JA_JP.pod
- copied unchanged from r17940, branches/upstream/libmime-charset-perl/current/Charset/JA_JP.pod
Removed:
trunk/libmime-charset-perl/Charset-ja_JP.pod
Modified:
trunk/libmime-charset-perl/Changes
trunk/libmime-charset-perl/Charset.pm
trunk/libmime-charset-perl/MANIFEST
trunk/libmime-charset-perl/META.yml
trunk/libmime-charset-perl/README
trunk/libmime-charset-perl/debian/changelog
trunk/libmime-charset-perl/debian/rules
Modified: trunk/libmime-charset-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/Changes?rev=17941&op=diff
==============================================================================
--- trunk/libmime-charset-perl/Changes (original)
+++ trunk/libmime-charset-perl/Changes Mon Mar 24 05:48:37 2008
@@ -1,3 +1,9 @@
+2008-03-20 Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
+ * Release 1.002.
+ * New method undecode().
+ * encoder(): added argument to set instance.
+ * Cleanup PODs.
+
2008-03-15 Hatuka*nezumi - IKEDA Soji <hatuka at nezumi.nu>
* Release 1.001.
Modified: trunk/libmime-charset-perl/Charset.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/Charset.pm?rev=17941&op=diff
==============================================================================
--- trunk/libmime-charset-perl/Charset.pm (original)
+++ trunk/libmime-charset-perl/Charset.pm Mon Mar 24 05:48:37 2008
@@ -121,7 +121,7 @@
}
}
-$VERSION = '1.001';
+$VERSION = '1.002';
######## Private Attributes ########
@@ -375,7 +375,7 @@
=item canonical_charset CHARSET
-Get canonical name for charset CHARSET.
+Get canonical name for charset.
=cut
@@ -391,23 +391,6 @@
$self->{InputCharset};
}
-=item $charset->decode(STRING [,CHECK])
-
-Decode STRING to Unicode.
-
-B<Note>:
-When Unicode/multibyte support is disabled (see L<"USE_ENCODE">),
-this function will die.
-
-=cut
-
-sub decode($$$;) {
- my $self = shift;
- my $s = shift;
- my $check = shift || 0;
- $self->{Decoder}->decode($s, $check);
-}
-
=item $charset->decoder
Get L<"Encode::Encoding"> object to decode strings by charset.
@@ -419,39 +402,23 @@
$self->{Decoder};
}
-=item $charset->encode(STRING [,CHECK])
-
-Encode STRING (Unicode or non-Unicode) using compatible charset recommended
-to be used for messages on Internet (if this module know it).
-Note that string will be decoded then encoded even if compatible charset
-was equal to original charset.
-
-B<Note>:
-When Unicode/multibyte support is disabled (see L<"USE_ENCODE">),
-this function will die.
-
-=cut
-
-sub encode($$$;) {
- my $self = shift;
- my $s = shift;
- my $check = shift || 0;
-
- unless (is_utf8($s) or $s =~ /[^\x00-\xFF]/) {
- $s = $self->{Decoder}->decode($s, ($check & 0x1)? FB_CROAK(): 0);
- }
- $self->{Encoder}->encode($s, $check);
-}
-
-=item $charset->encoder
+=item $charset->encoder([CHARSET])
Get L<"Encode::Encoding"> object to encode Unicode string using compatible
charset recommended to be used for messages on Internet.
=cut
-sub encoder($) {
- my $self = shift;
+sub encoder($$;) {
+ my $self = shift;
+ my $charset = shift;
+ if ($charset) {
+ $charset = MIME::Charset->new($charset) unless ref $charset;
+ $self->{OutputCharset} = $charset->{InputCharset};
+ $self->{Encoder} = $charset->{Decoder};
+ #XXX$self->{BodyEncoding} = $charset->{BodyEncoding};
+ #XXX$self->{HeaderEncoding} = $charset->{HeaderEncoding};
+ }
$self->{Encoder};
}
@@ -578,6 +545,47 @@
$enc = 'BASE64';
}
return ($encoded, $cset, $enc);
+}
+
+=item $charset->decode(STRING [,CHECK])
+
+Decode STRING to Unicode.
+
+B<Note>:
+When Unicode/multibyte support is disabled (see L<"USE_ENCODE">),
+this function will die.
+
+=cut
+
+sub decode($$$;) {
+ my $self = shift;
+ my $s = shift;
+ my $check = shift || 0;
+ $self->{Decoder}->decode($s, $check);
+}
+
+=item $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.
+
+B<Note>:
+When Unicode/multibyte support is disabled (see L<"USE_ENCODE">),
+this function will die.
+
+=cut
+
+sub encode($$$;) {
+ my $self = shift;
+ my $s = shift;
+ my $check = shift || 0;
+
+ unless (is_utf8($s) or $s =~ /[^\x00-\xFF]/) {
+ $s = $self->{Decoder}->decode($s, ($check & 0x1)? FB_CROAK(): 0);
+ }
+ $self->{Encoder}->encode($s, $check);
}
=item $charset->encoded_header_len(STRING [, ENCODING])
@@ -839,6 +847,24 @@
return $DEFAULT_CHARSET;
}
+=item $charset->undecode(STRING [,CHECK])
+
+Encode Unicode string STRING to byte string by input charset of $charset.
+This is a equivalent to C<$charset->decoder->encode()>.
+
+B<Note>:
+When Unicode/multibyte support is disabled (see L<"USE_ENCODE">),
+this function will die.
+
+=cut
+
+sub undecode($$$;) {
+ my $self = shift;
+ my $s = shift;
+ my $check = shift || 0;
+ $self->{Decoder}->encode($s, $check);
+}
+
=head2 Manipulating Module Defaults
=over 4
Modified: trunk/libmime-charset-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/MANIFEST?rev=17941&op=diff
==============================================================================
--- trunk/libmime-charset-perl/MANIFEST (original)
+++ trunk/libmime-charset-perl/MANIFEST Mon Mar 24 05:48:37 2008
@@ -1,9 +1,9 @@
ARTISTIC
Changes
Charset.pm
-Charset-ja_JP.pod
Charset/_Compat.pm
Charset/Defaults.pm.sample
+Charset/JA_JP.pod
GPL
Makefile.PL
MANIFEST This list of files
Modified: trunk/libmime-charset-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/META.yml?rev=17941&op=diff
==============================================================================
--- trunk/libmime-charset-perl/META.yml (original)
+++ trunk/libmime-charset-perl/META.yml Mon Mar 24 05:48: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.001
+version: 1.002
version_from: Charset.pm
installdirs: site
requires:
Modified: trunk/libmime-charset-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/README?rev=17941&op=diff
==============================================================================
--- trunk/libmime-charset-perl/README (original)
+++ trunk/libmime-charset-perl/README Mon Mar 24 05:48:37 2008
@@ -70,7 +70,7 @@
MIME::Charset provides informations about character sets used for MIME
messages on Internet.
- DEFINITIONS
+ Definitions
The charset is ``character set'' used in MIME to refer to a method of
converting a sequence of octets into a sequence of characters. It
includes both concepts of ``coded character set'' (CCS) and ``character
@@ -80,11 +80,20 @@
body part or a header body as sequence(s) of printable US-ASCII
characters.
- CONSTRUCTOR
- $charset = MIME::Charset->new(CHARSET)
- Create charset object from CHARSET.
-
- GETTING INFORMATIONS OF CHARSETS
+ Constructor
+ $charset = MIME::Charset->new([CHARSET [, OPTS]])
+ Create charset object.
+
+ OPTS may accept following key-value pairs. NOTE: When
+ Unicode/multibyte support is disabled (see "USE_ENCODE"), conversion
+ will not be performed. So these options do not have any effects.
+
+ Mapping => MAPTYPE
+ Specify extended mappings actually used for charset names.
+ "EXTENDED" uses extended mappings. "STANDARD" uses standardized
+ strict mappings. Default is "EXTENDED".
+
+ Getting Informations of Charsets
$charset->body_encoding
body_encoding CHARSET
Get recommended transfer-encoding of CHARSET for message body.
@@ -93,9 +102,16 @@
or "undef" (might not be transfer-encoded; either 7BIT or 8BIT).
This may not be same as encoding for message header.
- $charset->canonical_charset
+ $charset->as_string
canonical_charset CHARSET
- Get canonical name for charset CHARSET.
+ Get canonical name for charset.
+
+ $charset->decoder
+ Get "Encode::Encoding" object to decode strings by charset.
+
+ $charset->encoder([CHARSET])
+ Get "Encode::Encoding" object to encode Unicode string using
+ compatible charset recommended to be used for messages on Internet.
$charset->header_encoding
header_encoding CHARSET
@@ -114,7 +130,7 @@
When Unicode/multibyte support is disabled (see "USE_ENCODE"), this
function will simply return the result of "canonical_charset".
- TRANSLATING TEXT DATA
+ Translating Text Data
$charset->body_encode(STRING [, OPTS])
body_encode STRING, CHARSET [, OPTS]
Get converted (if needed) data of STRING and recommended
@@ -140,6 +156,21 @@
*transfer-encoding* will be "BASE64". *Charset for output* will be
"US-ASCII" if and only if string does not contain any non-ASCII
bytes.
+
+ $charset->decode(STRING [,CHECK])
+ Decode STRING to Unicode.
+
+ Note: When Unicode/multibyte support is disabled (see "USE_ENCODE"),
+ this function will die.
+
+ $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.
+
+ Note: When Unicode/multibyte support is disabled (see "USE_ENCODE"),
+ this function will die.
$charset->encoded_header_len(STRING [, ENCODING])
encoded_header_len STRING, ENCODING, CHARSET
@@ -175,7 +206,14 @@
be "US-ASCII" if and only if string does not contain any non-ASCII
bytes.
- MANIPULATING MODULE DEFAULTS
+ $charset->undecode(STRING [,CHECK])
+ Encode Unicode string STRING to byte string by input charset of
+ $charset. This is a equivalent to "$charset-"decoder->encode()>.
+
+ Note: When Unicode/multibyte support is disabled (see "USE_ENCODE"),
+ this function will die.
+
+ Manipulating Module Defaults
alias ALIAS [, CHARSET]
Get/set charset alias for canonical names determined by
"canonical_charset".
@@ -242,14 +280,14 @@
changed. Use "header_encoding", "body_encoding" or "output_charset"
to get particular profile.
- CONSTANTS
+ Constants
USE_ENCODE
- Unicode/multibyte support flag. Non-null string will be set when
+ Unicode/multibyte support flag. Non-empty string will be set when
Unicode and multibyte support is enabled. Currently, this flag will
- be non-null on Perl 5.8.1 or later and null string on earlier
+ be non-empty on Perl 5.8.1 or later and empty string on earlier
versions of Perl.
- ERROR HANDLING
+ Error Handling
"body_encode" and "header_encode" accept following "Replacement"
options:
@@ -276,6 +314,11 @@
If error handling scheme is not specified or unknown scheme is
specified, "DEFAULT" will be assumed.
+ Configuration File
+ Built-in defaults for option parameters can be overridden by
+ configuration file: MIME/Charset/Defaults.pm. For more details read
+ MIME/Charset/Defaults.pm.sample.
+
VERSION
Consult $VERSION variable.
Modified: trunk/libmime-charset-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/debian/changelog?rev=17941&op=diff
==============================================================================
--- trunk/libmime-charset-perl/debian/changelog (original)
+++ trunk/libmime-charset-perl/debian/changelog Mon Mar 24 05:48:37 2008
@@ -1,3 +1,11 @@
+libmime-charset-perl (1.002-1) unstable; urgency=low
+
+ * New upstream release
+ * Remove make test call from install-stamp target (test suites
+ was called two times)
+
+ -- Rene Mayorga <rmayorga at debian.org.sv> Sun, 23 Mar 2008 23:35:59 -0600
+
libmime-charset-perl (1.001-1) unstable; urgency=low
* New upstream release.
Modified: trunk/libmime-charset-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libmime-charset-perl/debian/rules?rev=17941&op=diff
==============================================================================
--- trunk/libmime-charset-perl/debian/rules (original)
+++ trunk/libmime-charset-perl/debian/rules Mon Mar 24 05:48:37 2008
@@ -39,7 +39,6 @@
dh_testdir
dh_testroot
dh_clean -k
- $(MAKE) test
$(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
# As this is a architecture independent package, we are not
# supposed to install stuff to /usr/lib. MakeMaker creates
More information about the Pkg-perl-cvs-commits
mailing list