r2075 - in
packages/libunicode-maputf8-perl/branches/upstream/current: .
lib/Unicode pod t
Niko Tyni
ntyni-guest at costa.debian.org
Thu Feb 2 19:40:06 UTC 2006
Author: ntyni-guest
Date: 2006-02-02 19:35:47 +0000 (Thu, 02 Feb 2006)
New Revision: 2075
Added:
packages/libunicode-maputf8-perl/branches/upstream/current/Build.PL
packages/libunicode-maputf8-perl/branches/upstream/current/Changes
packages/libunicode-maputf8-perl/branches/upstream/current/META.yml
packages/libunicode-maputf8-perl/branches/upstream/current/lib/Unicode/MapUTF8.pod
packages/libunicode-maputf8-perl/branches/upstream/current/pod/
packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.en.pod
packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.ja_JP.eucjp.pod
packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.ja_JP.utf8.pod
packages/libunicode-maputf8-perl/branches/upstream/current/t/97_distribution.t
packages/libunicode-maputf8-perl/branches/upstream/current/t/98_pod_coverage.t
packages/libunicode-maputf8-perl/branches/upstream/current/t/99_pod.t
Modified:
packages/libunicode-maputf8-perl/branches/upstream/current/MANIFEST
packages/libunicode-maputf8-perl/branches/upstream/current/Makefile.PL
packages/libunicode-maputf8-perl/branches/upstream/current/README
packages/libunicode-maputf8-perl/branches/upstream/current/lib/Unicode/MapUTF8.pm
packages/libunicode-maputf8-perl/branches/upstream/current/t/01_unicode_maputf8.t
Log:
Load /tmp/tmp.DbuqVy/libunicode-maputf8-perl-1.11 into
packages/libunicode-maputf8-perl/branches/upstream/current.
Added: packages/libunicode-maputf8-perl/branches/upstream/current/Build.PL
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/Build.PL 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/Build.PL 2006-02-02 19:35:47 UTC (rev 2075)
@@ -0,0 +1,32 @@
+use Module::Build;
+use File::Copy qw(copy);
+
+my $lang = defined($ENV{'LANG'}) ? $ENV{'LANG'} : 'en';
+my $target_pod = File::Spec->catfile('lib','Unicode','MapUTF8.pod');
+if ($lang =~ m/^(ja|ja_JP|ja_JP.utf-8|ja_JP.utf8|ja.utf8|ja.utf-8)$/i) {
+ $source_pod = File::Spec->catfile('pod','MapUTF8.ja_JP.utf8.pod');
+ copy ($source_pod, $target_pod);
+
+} elsif ($lang =~ m/^(ja_JP.eucjp|ja_JP.euc|ja_euc|ja_eucjp)$/i) {
+ $source_pod = File::Spec->catfile('pod','MapUTF8.ja_JP.eucjp.pod');
+ copy ($source_pod, $target_pod);
+} else {
+ $source_pod = File::Spec->catfile('pod','MapUTF8.en.pod');
+ copy ($source_pod, $target_pod);
+}
+
+my $build = Module::Build->new
+ ( module_name => 'Unicode::MapUTF8',
+ dist_author => 'Benjamin Franz <snowhare at nihongo.org>',
+ dist_abstract => 'Conversions to and from arbitrary character sets and UTF8',
+ license => 'perl',
+ requires => {
+ 'Carp' => 0,
+ 'File::Copy' => 0,
+ 'Unicode::Map' => 0,
+ 'Unicode::String' => 0,
+ 'Unicode::Map8' => 0,
+ 'Jcode' => 0,
+ },
+ build_requires => { },
+ )->create_build_script;
Added: packages/libunicode-maputf8-perl/branches/upstream/current/Changes
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/Changes 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/Changes 2006-02-02 19:35:47 UTC (rev 2075)
@@ -0,0 +1,67 @@
+Unicode::MapUTF8 - Conversions to and from arbitrary character sets and UTF8
+
+1.11 2005.10.10 Documentation changes. Addition of Build.PL support.
+ Added various build tests, LICENSE, Artistic_License.txt,
+ GPL_License.txt. Split documentation into seperate
+ .pod file. Added Japanese translation of POD.
+
+1.10 2005.05.22 - Fixed bug in conversion of ISO-2022-JP to UTF-8.
+ Problem and fix found by Masahiro HONMA
+ <masahiro.honma at tsutaya.co.jp>.
+
+ Similar bugs in conversions of shift_jis and euc-jp
+ to UTF-8 corrected as well.
+
+1.09 2001.08.22 - Fixed multiple typo occurances of 'uft'
+ where 'utf' was meant in code. Problem affected
+ utf16 and utf7 encodings. Problem found
+ by devon smith <devon at taller.PSCL.cwru.edu>
+
+1.08 2000.11.06 Added 'utf8_charset_alias' function to allow for runtime
+ setting of character set aliases. Added several alternate
+ names for 'sjis' (shiftjis, shift-jis, shift_jis, s-jis,
+ and s_jis).
+
+ Corrected 'croak' messages for 'from_utf8' functions to
+ appropriate function name.
+
+ Corrected fatal problem in jcode-unicode internals. Problem
+ and fix found by Brian Wisti <wbrian2 at uswest.net>.
+
+1.07 2000.11.01 Added 'croak' to use Carp declaration to fix error
+ messages. Problem and fix found by <wbrian2 at uswest.net>.
+
+1.06 2000.10.30 Fix to handle change in stringification of overloaded
+ objects between Perl 5.005 and 5.6.
+ Problem noticed by Brian Wisti <wbrian2 at uswest.net>.
+
+1.05 2000.10.23 Error in conversions from UTF8 to multibyte encodings corrected
+
+1.04 2000.10.23 Additional diagnostic error messages added for
+ internal errors
+
+1.03 2000.10.22 Bug fix for load time Unicode::Map encoding
+ detection
+
+1.02 2000.10.22 Bug fix to 'from_utf8' method and load time
+ detection of Unicode::Map8 supported character
+ set encodings
+
+1.01 2000.10.02 Initial public release
+
+Provides an adapter layer between core routines for converting
+to and from UTF8 and other encodings. In essence, a way to give
+multiple existing Unicode modules a single common interface so
+you don't have to know the underlaying implementations to do
+simple UTF8 to-from other character set string conversions.
+As such, it wraps the Unicode::String, Unicode::Map8,
+Unicode::Map and Jcode modules in a standardized and simple
+API.
+
+To install:
+
+perl Makefile.PL
+make
+make test
+make install
+
Modified: packages/libunicode-maputf8-perl/branches/upstream/current/MANIFEST
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/MANIFEST 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/MANIFEST 2006-02-02 19:35:47 UTC (rev 2075)
@@ -1,3 +1,5 @@
+Build.PL
+Changes
MANIFEST
Makefile.PL
README
@@ -2,2 +4,10 @@
lib/Unicode/MapUTF8.pm
+lib/Unicode/MapUTF8.pod
+pod/MapUTF8.ja_JP.utf8.pod
+pod/MapUTF8.ja_JP.eucjp.pod
+pod/MapUTF8.en.pod
t/01_unicode_maputf8.t
+t/97_distribution.t
+t/98_pod_coverage.t
+t/99_pod.t
+META.yml
Added: packages/libunicode-maputf8-perl/branches/upstream/current/META.yml
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/META.yml 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/META.yml 2006-02-02 19:35:47 UTC (rev 2075)
@@ -0,0 +1,19 @@
+---
+name: Unicode-MapUTF8
+version: 1.11
+author:
+ - Benjamin Franz <snowhare at nihongo.org>
+abstract: Conversions to and from arbitrary character sets and UTF8
+license: perl
+requires:
+ Carp: 0
+ File::Copy: 0
+ Jcode: 0
+ Unicode::Map: 0
+ Unicode::Map8: 0
+ Unicode::String: 0
+provides:
+ Unicode::MapUTF8:
+ file: lib/Unicode/MapUTF8.pm
+ version: 1.11
+generated_by: Module::Build version 0.261
Modified: packages/libunicode-maputf8-perl/branches/upstream/current/Makefile.PL
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/Makefile.PL 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/Makefile.PL 2006-02-02 19:35:47 UTC (rev 2075)
@@ -1,16 +1,45 @@
use ExtUtils::MakeMaker;
+use File::Spec;
+use File::Copy qw (copy);
+
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
+
+my $lang = defined($ENV{'LANG'}) ? $ENV{'LANG'} : 'en';
+my $target_pod = File::Spec->catfile('lib','Unicode','MapUTF8.pod');
+if ($lang =~ m/^(ja|ja_JP|ja_JP.utf-8|ja_JP.utf8|ja.utf8|ja.utf-8)$/i) {
+ $source_pod = File::Spec->catfile('pod','MapUTF8.ja_JP.utf8.pod');
+ copy ($source_pod, $target_pod);
+
+} elsif ($lang =~ m/^(ja_JP.eucjp|ja_JP.euc|ja_euc|ja_eucjp)$/i) {
+ $source_pod = File::Spec->catfile('pod','MapUTF8.ja_JP.eucjp.pod');
+ copy ($source_pod, $target_pod);
+} else {
+ $source_pod = File::Spec->catfile('pod','MapUTF8.en.pod');
+ copy ($source_pod, $target_pod);
+}
+
WriteMakefile(
- 'NAME' => 'Unicode::MapUTF8',
- 'VERSION_FROM' => 'lib/Unicode/MapUTF8.pm',
- 'linkext' => { 'LINKTYPE' => '' }, # no link needed
- 'dist' => { 'COMPRESS' => 'gzip -9f', 'SUFFIX' => 'gz',
- 'ZIP' => '/usr/bin/zip','ZIPFLAGS'=>'-rl'},
-'PREREQ_PM' => {
- 'Unicode::Map' => 0,
- 'Unicode::String' => 0,
- 'Unicode::Map8' => 0,
- 'Jcode' => 0,
- },
+ 'NAME' => 'Unicode::MapUTF8',
+ 'VERSION_FROM' => 'lib/Unicode/MapUTF8.pm',
+ 'linkext' => { LINKTYPE=>'' }, # no link needed
+ 'dist' => {'COMPRESS'=>'gzip -9f', 'SUFFIX' => 'gz',
+ 'ZIP'=>'/usr/bin/zip','ZIPFLAGS'=>'-rl'},
+ 'PREREQ_PM' => {
+ 'Carp' => 0,
+ 'File::Copy' => 0,
+ 'Unicode::Map' => 0,
+ 'Unicode::String' => 0,
+ 'Unicode::Map8' => 0,
+ 'Jcode' => 0,
+ },
+ ($] >= 5.005 ? ## Add these new keywords supported since 5.005
+ (ABSTRACT_FROM => 'lib/Unicode/MapUTF8.pod', # retrieve abstract from module
+ AUTHOR => 'Benjamin Franz <snowhare at nihongo.org>') : ()),
+
+ ($] >= 5.800 ? ## Add these new keywords supported since 5.8
+ (NO_META => 1) : ()),
+
+ PL_FILES => {},
+
);
Modified: packages/libunicode-maputf8-perl/branches/upstream/current/README
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/README 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/README 2006-02-02 19:35:47 UTC (rev 2075)
@@ -1,37 +1,5 @@
Unicode::MapUTF8 - Conversions to and from arbitrary character sets and UTF8
-1.08 2000.11.06 Added 'utf8_charset_alias' function to allow for runtime
- setting of character set aliases. Added several alternate
- names for 'sjis' (shiftjis, shift-jis, shift_jis, s-jis,
- and s_jis).
-
- Corrected 'croak' messages for 'from_utf8' functions to
- appropriate function name.
-
- Corrected fatal problem in jcode-unicode internals. Problem
- and fix found by Brian Wisti <wbrian2 at uswest.net>.
-
-1.07 2000.11.01 Added 'croak' to use Carp declaration to fix error
- messages. Problem and fix found by <wbrian2 at uswest.net>.
-
-1.06 2000.10.30 Fix to handle change in stringification of overloaded
- objects between Perl 5.005 and 5.6.
- Problem noticed by Brian Wisti <wbrian2 at uswest.net>.
-
-1.05 2000.10.23 Error in conversions from UTF8 to multibyte encodings corrected
-
-1.04 2000.10.23 Additional diagnostic error messages added for
- internal errors
-
-1.03 2000.10.22 Bug fix for load time Unicode::Map encoding
- detection
-
-1.02 2000.10.22 Bug fix to 'from_utf8' method and load time
- detection of Unicode::Map8 supported character
- set encodings
-
-1.01 2000.10.02 Initial public release
-
Provides an adapter layer between core routines for converting
to and from UTF8 and other encodings. In essence, a way to give
multiple existing Unicode modules a single common interface so
@@ -41,6 +9,10 @@
Unicode::Map and Jcode modules in a standardized and simple
API.
+Mainly intended for use with Perl 5.6 and 5.0 since starting
+with Perl 5.8 the Encode modules are the preferred way of
+handling character set encodings.
+
To install:
perl Makefile.PL
@@ -48,3 +20,11 @@
make test
make install
+Alternatively, if you have Module::Build installed,
+
+perl Build.PL
+./Build
+./Build test
+./Build install
+
+See 'perldoc Unicode::MapUTF8' for the documentation.
Modified: packages/libunicode-maputf8-perl/branches/upstream/current/lib/Unicode/MapUTF8.pm
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/lib/Unicode/MapUTF8.pm 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/lib/Unicode/MapUTF8.pm 2006-02-02 19:35:47 UTC (rev 2075)
@@ -2,7 +2,6 @@
use strict;
use Carp qw(confess croak carp);
-use Exporter;
use Unicode::String;
use Unicode::Map;
use Unicode::Map8;
@@ -11,12 +10,13 @@
use vars qw ($VERSION @EXPORT @EXPORT_OK @EXPORT_TAGS @ISA);
use subs qw (utf8_supported_charset to_utf8 from_utf8 utf8_charset_alias _init_charsets);
+require Exporter;
BEGIN {
@ISA = qw(Exporter);
@EXPORT = qw ();
@EXPORT_OK = qw (utf8_supported_charset to_utf8 from_utf8 utf8_charset_alias);
@EXPORT_TAGS = qw ();
- $VERSION = "1.09";
+ $VERSION = "1.11";
}
############################
@@ -26,170 +26,8 @@
my $_Charset_Aliases;
_init_charsets;
-=head1 NAME
+##############
-Unicode::MapUTF8 - Conversions to and from arbitrary character sets and UTF8
-
-=head1 SYNOPSIS
-
- use Unicode::MapUTF8 qw(to_utf8 from_utf8 utf8_supported_charset);
-
- # Convert a string in 'ISO-8859-1' to 'UTF8'
- my $output = to_utf8({ -string => 'An example', -charset => 'ISO-8859-1' });
-
- # Convert a string in 'UTF8' encoding to encoding 'ISO-8859-1'
- my $other = from_utf8({ -string => 'Other text', -charset => 'ISO-8859-1' });
-
- # List available character set encodings
- my @character_sets = utf8_supported_charset;
-
- # Add a character set alias
- utf8_charset_alias({ 'ms-japanese' => 'sjis' });
-
- # Convert between two arbitrary (but largely compatible) charset encodings
- # (SJIS to EUC-JP)
- my $utf8_string = to_utf8({ -string =>$sjis_string, -charset => 'sjis'});
- my $euc_jp_string = from_utf8({ -string => $utf8_string, -charset => 'euc-jp' })
-
- # Verify that a specific character set is supported
- if (utf8_supported_charset('ISO-8859-1') {
- # Yes
- }
-
-=head1 DESCRIPTION
-
-Provides an adapter layer between core routines for converting
-to and from UTF8 and other encodings. In essence, a way to give multiple
-existing Unicode modules a single common interface so you don't have to know
-the underlaying implementations to do simple UTF8 to-from other character set
-encoding conversions. As such, it wraps the Unicode::String, Unicode::Map8,
-Unicode::Map and Jcode modules in a standardized and simple API.
-
-This also provides general character set conversion operation based on UTF8 - it is
-possible to convert between any two compatible and supported character sets
-via a simple two step chaining of conversions.
-
-As with most things Perlish - if you give it a few big chunks of text to chew on
-instead of lots of small ones it will handle many more characters per second.
-
-By design, it can be easily extended to encompass any new charset encoding
-conversion modules that arrive on the scene.
-
-=head1 CHANGES
-
-1.09 2001.08.22 - Fixed multiple typo occurances of 'uft'
- where 'utf' was meant in code. Problem affected
- utf16 and utf7 encodings. Problem found
- by devon smith <devon at taller.PSCL.cwru.edu>
-
-1.08 2000.11.06 - Added 'utf8_charset_alias' function to
- allow for runtime setting of character
- set aliases. Added several alternate
- names for 'sjis' (shiftjis, shift-jis,
- shift_jis, s-jis, and s_jis).
-
- Corrected 'croak' messages for
- 'from_utf8' functions to appropriate
- function name.
-
- Tightened up initialization encapsulation
-
- Corrected fatal problem in jcode from
- unicode internals. Problem and fix
- found by Brian Wisti <wbrian2 at uswest.net>.
-
-1.07 2000.11.01 - Added 'croak' to use Carp declaration to
- fix error messages. Problem and fix
- found by Brian Wisti
- <wbrian2 at uswest.net>.
-
-1.06 2000.10.30 - Fix to handle change in stringification
- of overloaded objects between Perl 5.005
- and 5.6. Problem noticed by Brian Wisti
- <wbrian2 at uswest.net>.
-
-1.05 2000.10.23 - Error in conversions from UTF8 to
- multibyte encodings corrected
-
-1.04 2000.10.23 - Additional diagnostic messages added
- for internal error conditions
-
-1.03 2000.10.22 - Bug fix for load time autodetction of
- Unicode::Map8 encodings
-
-1.02 2000.10.22 - Added load time autodetection of
- Unicode::Map8 supported character set
- encodings.
-
- Fixed internal calling error for some
- character sets with 'from_utf8'. Thanks
- goes to Ilia Lobsanov
- <ilia at lobsanov.com> for reporting this
- problem.
-
-1.01 2000.10.02 - Fixed handling of empty strings and
- added more identification for error
- messages.
-
-1.00 2000.09.29 - Pre-release version
-
-=head1 FUNCTIONS
-
-=cut
-
-######################################################################
-
-=over 4
-
-=item utf8_charset_alias({ $alias => $charset });
-
-Used for runtime assignment of character set aliases.
-
-Called with no parameters, returns a hash of defined aliases and the character sets
-they map to.
-
-Example:
-
- my $aliases = utf8_charset_alias;
- my @alias_names = keys %$aliases;
-
-If called with ONE parameter, returns the name of the 'real' charset
-if the alias is defined. Returns undef if it is not found in the aliases.
-
-Example:
-
- if (! utf8_charset_alias('VISCII')) {
- # No alias for this
- }
-
-If called with a list of 'alias' => 'charset' pairs, defines those aliases for use.
-
-Example:
-
- utf8_charset_alias({ 'japanese' => 'sjis', 'japan' => 'sjis' });
-
-Note: It will croak if a passed pair does not map to a character set
-defined in the predefined set of character encoding. It is NOT
-allowed to alias something to another alias.
-
-Multiple character set aliases can be set with a single call.
-
-To clear an alias, pass a character set mapping of undef.
-
-Example:
-
- utf8_charset_alias({ 'japanese' => undef });
-
-While an alias is set, the 'utf8_supported_charset' function
-will return the alias as if it were a predefined charset.
-
-Overriding a base defined character encoding with an alias
-will generate a warning message to STDERR.
-
-=back
-
-=cut
-
sub utf8_charset_alias {
if ($#_ == -1) {
my $aliases = {};
@@ -238,36 +76,8 @@
}
}
-######################################################################
+####
-=over 4
-
-=item utf8_supported_charset($charset_name);
-
-
-Returns true if the named charset is supported (including
-user defiend aliases).
-
-Returns false if it is not.
-
-Example:
-
- if (! utf8_supported_charset('VISCII')) {
- # No support yet
- }
-
-If called in a list context with no parameters, it will return
-a list of all supported character set names (including user
-defined aliases).
-
-Example:
-
- my @charsets = utf8_supported_charset;
-
-=back
-
-=cut
-
sub utf8_supported_charset {
if ($#_ == -1 && wantarray) {
my %all_charsets = (%$_Supported_Charsets, %$_Charset_Aliases);
@@ -284,19 +94,8 @@
return 0;
}
-######################################################################
+####
-=over 4
-
-=item to_utf8({ -string => $string, -charset => $source_charset });
-
-
-Returns the string converted to UTF8 from the specified source charset.
-
-=back
-
-=cut
-
sub to_utf8 {
my @parm_list = @_;
my $parms = {};
@@ -339,18 +138,8 @@
}
}
-######################################################################
+####
-=over 4
-
-=item from_utf8({ -string => $string, -charset => $target_charset});
-
-Returns the string converted from UTF8 to the specified target charset.
-
-=back
-
-=cut
-
sub from_utf8 {
my @parm_list = @_;
my $parms;
@@ -604,7 +393,7 @@
$target_charset = lc ($target_charset);
my $final;
- if ($target_charset eq 'iso-2022-jp') {
+ if ($target_charset =~ m/^iso[-_]2022[-_]jp$/) {
$final = $j->iso_2022_jp;
} elsif ($target_charset eq 'sjis') {
$final = $j->sjis;
@@ -631,17 +420,17 @@
$source_charset = lc ($source_charset);
my $final;
- if ($source_charset eq 'iso-2022-jp') {
- my $j = Jcode->new($string,$source_charset);
+ if ($source_charset =~ m/^iso[-_]2022[-_]jp$/) {
+ my $j = Jcode->new($string,'jis')->h2z;
$final = $j->utf8;
} elsif ($source_charset =~m/^(s[-_]?jis|shift[-_]?jis)$/) {
- my $j = Jcode->new($string,$source_charset);
+ my $j = Jcode->new($string,'sjis');
$final = $j->utf8;
} elsif ($source_charset eq 'euc-jp') {
- my $j = Jcode->new($string,$source_charset);
+ my $j = Jcode->new($string,'euc');
$final = $j->utf8;
} elsif ($source_charset eq 'jis') {
- my $j = Jcode->new($string,$source_charset);
+ my $j = Jcode->new($string,'jis');
$final = $j->utf8;
} else {
croak( '[' . localtime(time) . '] ' . __PACKAGE__ . "::_jcode_to_utf8() - charset '$source_charset' is not supported\n");
@@ -672,6 +461,7 @@
'shift-jis' => 'jcode',
'shift_jis' => 'jcode',
'iso-2022-jp' => 'jcode',
+ 'iso_2022_jp' => 'jcode',
'jis' => 'jcode',
'euc-jp' => 'jcode',
};
@@ -747,29 +537,4 @@
######################################################################
-=head1 VERSION
-
-1.09 2001.08.22
-
-=head1 COPYRIGHT
-
-Copyright September, 2000 Benjamin Franz. All rights reserved.
-
-This software is free software. You can redistribute it
-and/or modify it under the same terms as Perl itself.
-
-=head1 AUTHOR
-
-Benjamin Franz <snowhare at nihongo.org>
-
-=head1 TODO
-
-Regression tests for Jcode, 2-byte encodings and encoding aliases
-
-=head1 SEE ALSO
-
-Unicode::String Unicode::Map8 Unicode::Map Jcode
-
-=cut
-
1;
Added: packages/libunicode-maputf8-perl/branches/upstream/current/lib/Unicode/MapUTF8.pod
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/lib/Unicode/MapUTF8.pod 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/lib/Unicode/MapUTF8.pod 2006-02-02 19:35:47 UTC (rev 2075)
@@ -0,0 +1,269 @@
+
+=head1 NAME
+
+Unicode::MapUTF8 - Conversions to and from arbitrary character sets and UTF8
+
+=head1 SYNOPSIS
+
+ use Unicode::MapUTF8 qw(to_utf8 from_utf8 utf8_supported_charset);
+
+ # Convert a string in 'ISO-8859-1' to 'UTF8'
+ my $output = to_utf8({ -string => 'An example', -charset => 'ISO-8859-1' });
+
+ # Convert a string in 'UTF8' encoding to encoding 'ISO-8859-1'
+ my $other = from_utf8({ -string => 'Other text', -charset => 'ISO-8859-1' });
+
+ # List available character set encodings
+ my @character_sets = utf8_supported_charset;
+
+ # Add a character set alias
+ utf8_charset_alias({ 'ms-japanese' => 'sjis' });
+
+ # Convert between two arbitrary (but largely compatible) charset encodings
+ # (SJIS to EUC-JP)
+ my $utf8_string = to_utf8({ -string =>$sjis_string, -charset => 'sjis'});
+ my $euc_jp_string = from_utf8({ -string => $utf8_string, -charset => 'euc-jp' })
+
+ # Verify that a specific character set is supported
+ if (utf8_supported_charset('ISO-8859-1') {
+ # Yes
+ }
+
+=head1 DESCRIPTION
+
+Provides an adapter layer between core routines for converting
+to and from UTF8 and other encodings. In essence, a way to give multiple
+existing Unicode modules a single common interface so you don't have to know
+the underlaying implementations to do simple UTF8 to-from other character set
+encoding conversions. As such, it wraps the Unicode::String, Unicode::Map8,
+Unicode::Map and Jcode modules in a standardized and simple API.
+
+This also provides general character set conversion operation based on UTF8 - it is
+possible to convert between any two compatible and supported character sets
+via a simple two step chaining of conversions.
+
+As with most things Perlish - if you give it a few big chunks of text to chew on
+instead of lots of small ones it will handle many more characters per second.
+
+By design, it can be easily extended to encompass any new charset encoding
+conversion modules that arrive on the scene.
+
+This module is intended to provide good Unicode support to versions of Perl
+prior to 5.8. If you are using Perl 5.8.0 or later, you probably want to be
+using the Encode module instead. This module B<does> work with Perl 5.8,
+but Encode is the preferred method in that environment.
+
+=head1 CHANGES
+
+ 1.11 2005.10.10 Documentation changes. Addition of Build.PL support.
+ Added various build tests, LICENSE, Artistic_License.txt,
+ GPL_License.txt. Split documentation into seperate
+ .pod file. Added Japanese translation of POD.
+
+ 1.10 2005.05.22 - Fixed bug in conversion of ISO-2022-JP to UTF-8.
+ Problem and fix found by Masahiro HONMA
+ <masahiro.honma at tsutaya.co.jp>.
+
+ Similar bugs in conversions of shift_jis and euc-jp
+ to UTF-8 fixed as well.
+
+ 1.09 2001.08.22 - Fixed multiple typo occurances of 'uft'
+ where 'utf' was meant in code. Problem affected
+ utf16 and utf7 encodings. Problem found
+ by devon smith <devon at taller.PSCL.cwru.edu>
+
+ 1.08 2000.11.06 - Added 'utf8_charset_alias' function to
+ allow for runtime setting of character
+ set aliases. Added several alternate
+ names for 'sjis' (shiftjis, shift-jis,
+ shift_jis, s-jis, and s_jis).
+
+ Corrected 'croak' messages for
+ 'from_utf8' functions to appropriate
+ function name.
+
+ Tightened up initialization encapsulation
+
+ Corrected fatal problem in jcode from
+ unicode internals. Problem and fix
+ found by Brian Wisti <wbrian2 at uswest.net>.
+
+ 1.07 2000.11.01 - Added 'croak' to use Carp declaration to
+ fix error messages. Problem and fix
+ found by Brian Wisti
+ <wbrian2 at uswest.net>.
+
+ 1.06 2000.10.30 - Fix to handle change in stringification
+ of overloaded objects between Perl 5.005
+ and 5.6. Problem noticed by Brian Wisti
+ <wbrian2 at uswest.net>.
+
+ 1.05 2000.10.23 - Error in conversions from UTF8 to
+ multibyte encodings corrected
+
+ 1.04 2000.10.23 - Additional diagnostic messages added
+ for internal error conditions
+
+ 1.03 2000.10.22 - Bug fix for load time autodetction of
+ Unicode::Map8 encodings
+
+ 1.02 2000.10.22 - Added load time autodetection of
+ Unicode::Map8 supported character set
+ encodings.
+
+ Fixed internal calling error for some
+ character sets with 'from_utf8'. Thanks
+ goes to Ilia Lobsanov
+ <ilia at lobsanov.com> for reporting this
+ problem.
+
+ 1.01 2000.10.02 - Fixed handling of empty strings and
+ added more identification for error
+ messages.
+
+ 1.00 2000.09.29 - Pre-release version
+
+=head1 FUNCTIONS
+
+=over 4
+
+=item utf8_charset_alias({ $alias => $charset });
+
+Used for runtime assignment of character set aliases.
+
+Called with no parameters, returns a hash of defined aliases and the character sets
+they map to.
+
+Example:
+
+ my $aliases = utf8_charset_alias;
+ my @alias_names = keys %$aliases;
+
+If called with ONE parameter, returns the name of the 'real' charset
+if the alias is defined. Returns undef if it is not found in the aliases.
+
+Example:
+
+ if (! utf8_charset_alias('VISCII')) {
+ # No alias for this
+ }
+
+If called with a list of 'alias' => 'charset' pairs, defines those aliases for use.
+
+Example:
+
+ utf8_charset_alias({ 'japanese' => 'sjis', 'japan' => 'sjis' });
+
+Note: It will croak if a passed pair does not map to a character set
+defined in the predefined set of character encoding. It is NOT
+allowed to alias something to another alias.
+
+Multiple character set aliases can be set with a single call.
+
+To clear an alias, pass a character set mapping of undef.
+
+Example:
+
+ utf8_charset_alias({ 'japanese' => undef });
+
+While an alias is set, the 'utf8_supported_charset' function
+will return the alias as if it were a predefined charset.
+
+Overriding a base defined character encoding with an alias
+will generate a warning message to STDERR.
+
+=back
+
+=over 4
+
+=item utf8_supported_charset($charset_name);
+
+
+Returns true if the named charset is supported (including
+user defined aliases).
+
+Returns false if it is not.
+
+Example:
+
+ if (! utf8_supported_charset('VISCII')) {
+ # No support yet
+ }
+
+If called in a list context with no parameters, it will return
+a list of all supported character set names (including user
+defined aliases).
+
+Example:
+
+ my @charsets = utf8_supported_charset;
+
+=back
+
+=over 4
+
+=item to_utf8({ -string => $string, -charset => $source_charset });
+
+Returns the string converted to UTF8 from the specified source charset.
+
+=back
+
+=over 4
+
+=item from_utf8({ -string => $string, -charset => $target_charset});
+
+Returns the string converted from UTF8 to the specified target charset.
+
+=back
+
+=head1 VERSION
+
+1.11 2005.10.10
+
+=head1 TODO
+
+Regression tests for Jcode, 2-byte encodings and encoding aliases
+
+=head1 SEE ALSO
+
+L<Unicode::String> L<Unicode::Map8> L<Unicode::Map> L<Jcode> L<Encode>
+
+=head1 COPYRIGHT
+
+Copyright 2000-2005, Benjamin Franz. All rights reserved.
+
+=head1 AUTHOR
+
+Benjamin Franz <snowhare at nihongo.org>
+
+=head1 LICENSE
+
+This program is free software; you can redistribute it
+and/or modify it under the same terms and conditions as
+Perl itself.
+
+This means that you can, at your option, redistribute it and/or modify it under
+either the terms the GNU Public License (GPL) version 1 or later, or under the
+Perl Artistic License.
+
+See http://dev.perl.org/licenses/
+
+=head1 DISCLAIMER
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE.
+
+Use of this software in any way or in any form, source or binary,
+is not allowed in any country which prohibits disclaimers of any
+implied warranties of merchantability or fitness for a particular
+purpose or any disclaimers of a similar nature.
+
+IN NO EVENT SHALL I BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OF THIS SOFTWARE AND ITS DOCUMENTATION (INCLUDING, BUT NOT
+LIMITED TO, LOST PROFITS) EVEN IF I HAVE BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE
+
+=cut
Added: packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.en.pod
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.en.pod 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.en.pod 2006-02-02 19:35:47 UTC (rev 2075)
@@ -0,0 +1,269 @@
+
+=head1 NAME
+
+Unicode::MapUTF8 - Conversions to and from arbitrary character sets and UTF8
+
+=head1 SYNOPSIS
+
+ use Unicode::MapUTF8 qw(to_utf8 from_utf8 utf8_supported_charset);
+
+ # Convert a string in 'ISO-8859-1' to 'UTF8'
+ my $output = to_utf8({ -string => 'An example', -charset => 'ISO-8859-1' });
+
+ # Convert a string in 'UTF8' encoding to encoding 'ISO-8859-1'
+ my $other = from_utf8({ -string => 'Other text', -charset => 'ISO-8859-1' });
+
+ # List available character set encodings
+ my @character_sets = utf8_supported_charset;
+
+ # Add a character set alias
+ utf8_charset_alias({ 'ms-japanese' => 'sjis' });
+
+ # Convert between two arbitrary (but largely compatible) charset encodings
+ # (SJIS to EUC-JP)
+ my $utf8_string = to_utf8({ -string =>$sjis_string, -charset => 'sjis'});
+ my $euc_jp_string = from_utf8({ -string => $utf8_string, -charset => 'euc-jp' })
+
+ # Verify that a specific character set is supported
+ if (utf8_supported_charset('ISO-8859-1') {
+ # Yes
+ }
+
+=head1 DESCRIPTION
+
+Provides an adapter layer between core routines for converting
+to and from UTF8 and other encodings. In essence, a way to give multiple
+existing Unicode modules a single common interface so you don't have to know
+the underlaying implementations to do simple UTF8 to-from other character set
+encoding conversions. As such, it wraps the Unicode::String, Unicode::Map8,
+Unicode::Map and Jcode modules in a standardized and simple API.
+
+This also provides general character set conversion operation based on UTF8 - it is
+possible to convert between any two compatible and supported character sets
+via a simple two step chaining of conversions.
+
+As with most things Perlish - if you give it a few big chunks of text to chew on
+instead of lots of small ones it will handle many more characters per second.
+
+By design, it can be easily extended to encompass any new charset encoding
+conversion modules that arrive on the scene.
+
+This module is intended to provide good Unicode support to versions of Perl
+prior to 5.8. If you are using Perl 5.8.0 or later, you probably want to be
+using the Encode module instead. This module B<does> work with Perl 5.8,
+but Encode is the preferred method in that environment.
+
+=head1 CHANGES
+
+ 1.11 2005.10.10 Documentation changes. Addition of Build.PL support.
+ Added various build tests, LICENSE, Artistic_License.txt,
+ GPL_License.txt. Split documentation into seperate
+ .pod file. Added Japanese translation of POD.
+
+ 1.10 2005.05.22 - Fixed bug in conversion of ISO-2022-JP to UTF-8.
+ Problem and fix found by Masahiro HONMA
+ <masahiro.honma at tsutaya.co.jp>.
+
+ Similar bugs in conversions of shift_jis and euc-jp
+ to UTF-8 fixed as well.
+
+ 1.09 2001.08.22 - Fixed multiple typo occurances of 'uft'
+ where 'utf' was meant in code. Problem affected
+ utf16 and utf7 encodings. Problem found
+ by devon smith <devon at taller.PSCL.cwru.edu>
+
+ 1.08 2000.11.06 - Added 'utf8_charset_alias' function to
+ allow for runtime setting of character
+ set aliases. Added several alternate
+ names for 'sjis' (shiftjis, shift-jis,
+ shift_jis, s-jis, and s_jis).
+
+ Corrected 'croak' messages for
+ 'from_utf8' functions to appropriate
+ function name.
+
+ Tightened up initialization encapsulation
+
+ Corrected fatal problem in jcode from
+ unicode internals. Problem and fix
+ found by Brian Wisti <wbrian2 at uswest.net>.
+
+ 1.07 2000.11.01 - Added 'croak' to use Carp declaration to
+ fix error messages. Problem and fix
+ found by Brian Wisti
+ <wbrian2 at uswest.net>.
+
+ 1.06 2000.10.30 - Fix to handle change in stringification
+ of overloaded objects between Perl 5.005
+ and 5.6. Problem noticed by Brian Wisti
+ <wbrian2 at uswest.net>.
+
+ 1.05 2000.10.23 - Error in conversions from UTF8 to
+ multibyte encodings corrected
+
+ 1.04 2000.10.23 - Additional diagnostic messages added
+ for internal error conditions
+
+ 1.03 2000.10.22 - Bug fix for load time autodetction of
+ Unicode::Map8 encodings
+
+ 1.02 2000.10.22 - Added load time autodetection of
+ Unicode::Map8 supported character set
+ encodings.
+
+ Fixed internal calling error for some
+ character sets with 'from_utf8'. Thanks
+ goes to Ilia Lobsanov
+ <ilia at lobsanov.com> for reporting this
+ problem.
+
+ 1.01 2000.10.02 - Fixed handling of empty strings and
+ added more identification for error
+ messages.
+
+ 1.00 2000.09.29 - Pre-release version
+
+=head1 FUNCTIONS
+
+=over 4
+
+=item utf8_charset_alias({ $alias => $charset });
+
+Used for runtime assignment of character set aliases.
+
+Called with no parameters, returns a hash of defined aliases and the character sets
+they map to.
+
+Example:
+
+ my $aliases = utf8_charset_alias;
+ my @alias_names = keys %$aliases;
+
+If called with ONE parameter, returns the name of the 'real' charset
+if the alias is defined. Returns undef if it is not found in the aliases.
+
+Example:
+
+ if (! utf8_charset_alias('VISCII')) {
+ # No alias for this
+ }
+
+If called with a list of 'alias' => 'charset' pairs, defines those aliases for use.
+
+Example:
+
+ utf8_charset_alias({ 'japanese' => 'sjis', 'japan' => 'sjis' });
+
+Note: It will croak if a passed pair does not map to a character set
+defined in the predefined set of character encoding. It is NOT
+allowed to alias something to another alias.
+
+Multiple character set aliases can be set with a single call.
+
+To clear an alias, pass a character set mapping of undef.
+
+Example:
+
+ utf8_charset_alias({ 'japanese' => undef });
+
+While an alias is set, the 'utf8_supported_charset' function
+will return the alias as if it were a predefined charset.
+
+Overriding a base defined character encoding with an alias
+will generate a warning message to STDERR.
+
+=back
+
+=over 4
+
+=item utf8_supported_charset($charset_name);
+
+
+Returns true if the named charset is supported (including
+user defined aliases).
+
+Returns false if it is not.
+
+Example:
+
+ if (! utf8_supported_charset('VISCII')) {
+ # No support yet
+ }
+
+If called in a list context with no parameters, it will return
+a list of all supported character set names (including user
+defined aliases).
+
+Example:
+
+ my @charsets = utf8_supported_charset;
+
+=back
+
+=over 4
+
+=item to_utf8({ -string => $string, -charset => $source_charset });
+
+Returns the string converted to UTF8 from the specified source charset.
+
+=back
+
+=over 4
+
+=item from_utf8({ -string => $string, -charset => $target_charset});
+
+Returns the string converted from UTF8 to the specified target charset.
+
+=back
+
+=head1 VERSION
+
+1.11 2005.10.10
+
+=head1 TODO
+
+Regression tests for Jcode, 2-byte encodings and encoding aliases
+
+=head1 SEE ALSO
+
+L<Unicode::String> L<Unicode::Map8> L<Unicode::Map> L<Jcode> L<Encode>
+
+=head1 COPYRIGHT
+
+Copyright 2000-2005, Benjamin Franz. All rights reserved.
+
+=head1 AUTHOR
+
+Benjamin Franz <snowhare at nihongo.org>
+
+=head1 LICENSE
+
+This program is free software; you can redistribute it
+and/or modify it under the same terms and conditions as
+Perl itself.
+
+This means that you can, at your option, redistribute it and/or modify it under
+either the terms the GNU Public License (GPL) version 1 or later, or under the
+Perl Artistic License.
+
+See http://dev.perl.org/licenses/
+
+=head1 DISCLAIMER
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE.
+
+Use of this software in any way or in any form, source or binary,
+is not allowed in any country which prohibits disclaimers of any
+implied warranties of merchantability or fitness for a particular
+purpose or any disclaimers of a similar nature.
+
+IN NO EVENT SHALL I BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OF THIS SOFTWARE AND ITS DOCUMENTATION (INCLUDING, BUT NOT
+LIMITED TO, LOST PROFITS) EVEN IF I HAVE BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE
+
+=cut
Added: packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.ja_JP.eucjp.pod
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.ja_JP.eucjp.pod 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.ja_JP.eucjp.pod 2006-02-02 19:35:47 UTC (rev 2075)
@@ -0,0 +1,258 @@
+
+=head1 ̾Á°
+
+Unicode::MapUTF8 - Ǥ°Õ¤Îʸ»ú¥»¥Ã¥È¤«¤é¡¿¤Ø¤ÎUTF8¤ÎÊÑ´¹
+
+=head1 ³µÍ×
+
+ use Unicode::MapUTF8 qw(to_utf8 from_utf8 utf8_supported_charset);
+
+ # 'ISO-8859-1'¤Îʸ»úÎó¤ò 'UTF8'¤ËÊÑ´¹¤¹¤ë
+ my $output = to_utf8({ -string => 'An example', -charset => 'ISO-8859-1' });
+
+ # 'UTF8'¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Îʸ»úÎó¤ò¥¨¥ó¥³¡¼¥Ç¥£¥ó¥° 'ISO-8859-1'¤ØÊÑ´¹¤¹¤ë
+ my $other = from_utf8({ -string => 'Other text', -charset => 'ISO-8859-1' });
+
+ # ÍøÍѤǤ¤ëʸ»ú¥»¥Ã¥È¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Î¥ê¥¹¥È
+ my @character_sets = utf8_supported_charset;
+
+ # ʸ»ú¥»¥Ã¥ÈÊÌ̾¤ÎÄɲÃ
+ utf8_charset_alias({ 'ms-japanese' => 'sjis' });
+
+ # £²¤Ä¤ÎǤ°Õ¤Î¡Ê¤·¤«¤·Â礤¯¸ß´¹À¤Î¤¢¤ë¡Ëʸ»ú¥»¥Ã¥È¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Ç¤ÎÊÑ´¹
+ # (SJIS to EUC-JP)
+ my $utf8_string = to_utf8({ -string =>$sjis_string, -charset => 'sjis'});
+ my $euc_jp_string = from_utf8({ -string => $utf8_string, -charset => 'euc-jp' })
+
+ # ÆÃÄê¤Îʸ»ú¥»¥Ã¥È¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¤«¤ò³Îǧ
+ if (utf8_supported_charset('ISO-8859-1') {
+ # Yes
+ }
+
+=head1 ÀâÌÀ
+
+UTF8¤È¤½¤Î¾¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤«¤é¡¿¤Ø¤ÎÊÑ´¹¤Î¤¿¤á¤ÎÃæ³Ë¤È¤Ê¤ë¥ë¡¼¥Á¥ó¤Î´Ö¤Î¥¢¥À¥×¥¿ÁؤòÄ󶡤·¤Þ¤¹¡£ËܼÁŪ¤Ë¤Ï¡¢Ê£¿ô¸ºß¤¹¤ë
+Unicode¥â¥¸¥å¡¼¥ë¤Ø¤Î£±¤Ä¤Î¶¦Ä̤Υ¤¥ó¥¿¡¼¥Õ¥§¡¼¥¹¡¢²¼Éߤ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¼ÂÁõ¤òÃΤ뤳¤È¤Ê¤¯¡¢´Êñ¤ËUTF8¤«¤é¡¿¤ØÂ¾¤Îʸ»ú¥»¥Ã¥È¥¨¥ó¥³¡¼¥Ç¥£
+¥ó¥°ÊÑ´¹¤ò´Êñ¤Ë¤ª¤³¤Ê¤¤¤Þ¤¹¡£¤½¤Î¤¿¤á¡¢¤³¤ì¤ÏUnicode::String¡¢Unicode::Map8¡¢Unicode::Map¡¢Jcode¥â
+¥¸¥å¡¼¥ë¤òɸ½à²½¤µ¤ì¤¿´Êñ¤ÊAPI¤ÎÃæ¤ËÊñ¤ß¤Þ¤¹¡£
+
+¤Þ¤¿¤³¤ì¤ÏUTF-8¤ò¥Ù¡¼¥¹¤Ë°ìÈÌŪ¤Êʸ»ú¥»¥Ã¥ÈÊÑ´¹¤âÄ󶡤·¤Þ¤¹¡Ý¤³¤ì¤Ï£²Ãʳ¬¤ÎÊÑ´¹¤Ä¤Ê¤²¤ë¤³¤È¤Ë¤è¤ê¡¢£²¤Ä¤Î¸ß´¹À¤¬¤¢¤ê¡¢¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ëʸ»ú¥»¥Ã¥È¤Ç²Äǽ¤Ç¤¹¡£
+
+¤Û¤È¤ó¤É¤Î¤³¤È¤¬PerlŪ¤Ê¤Î¤Ç¡Ý¤«¤ßºÕ¤¯ÂоݤȤ·¤Æ¿ô¿¤¯¤Î¾®¤µ¤¤¤Ê¤â¤Î¤ÎÂå¤ï¤ê¤Ë£²¡¢£³¤ÎÂ礤ʸǤޤê¤òÍ¿¤¨¤ë¤È¡¢1Éô֤ˤè¤ê¿¤¯¤Îʸ»ú¤ò°·¤¤¤Þ¤¹¡£
+
+À߷פǤϡ¢Åо줹¤ë¤¤¤«¤Ê¤ë¿·¤·¤¤Ê¸»ú¥»¥Ã¥È¡¦¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°ÊÑ´¹¥â¥¸¥å¡¼¥ë¤â¼è¤ê¹þ¤à¤è¤¦¤Ë´Êñ¤Ë³ÈÄ¥¤¹¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
+
+=head1 Êѹ¹ÅÀ
+
+¡Ê¸¶Ê¸¤Î¤Þ¤Þ¡Ë
+
+ 1.11 2005.10.10 Documentation changes. Addition of Build.PL support.
+ Added various build tests, LICENSE, Artistic_License.txt,
+ GPL_License.txt. Split documentation into seperate
+ .pod file. Added Japanese translation of POD.
+
+ 1.10 2005.05.22 - Fixed bug in conversion of ISO-2022-JP to UTF-8.
+ Problem and fix found by Masahiro HONMA
+ <masahiro.honma at tsutaya.co.jp>.
+
+ Similar bugs in conversions of shift_jis and euc-jp
+ to UTF-8 fixed as well.
+
+ 1.09 2001.08.22 - Fixed multiple typo occurances of 'uft'
+ where 'utf' was meant in code. Problem affected
+ utf16 and utf7 encodings. Problem found
+ by devon smith <devon at taller.PSCL.cwru.edu>
+
+ 1.08 2000.11.06 - Added 'utf8_charset_alias' function to
+ allow for runtime setting of character
+ set aliases. Added several alternate
+ names for 'sjis' (shiftjis, shift-jis,
+ shift_jis, s-jis, and s_jis).
+
+ Corrected 'croak' messages for
+ 'from_utf8' functions to appropriate
+ function name.
+
+ Tightened up initialization encapsulation
+
+ Corrected fatal problem in jcode from
+ unicode internals. Problem and fix
+ found by Brian Wisti <wbrian2 at uswest.net>.
+
+ 1.07 2000.11.01 - Added 'croak' to use Carp declaration to
+ fix error messages. Problem and fix
+ found by Brian Wisti
+ <wbrian2 at uswest.net>.
+
+ 1.06 2000.10.30 - Fix to handle change in stringification
+ of overloaded objects between Perl 5.005
+ and 5.6. Problem noticed by Brian Wisti
+ <wbrian2 at uswest.net>.
+
+ 1.05 2000.10.23 - Error in conversions from UTF8 to
+ multibyte encodings corrected
+
+ 1.04 2000.10.23 - Additional diagnostic messages added
+ for internal error conditions
+
+ 1.03 2000.10.22 - Bug fix for load time autodetction of
+ Unicode::Map8 encodings
+
+ 1.02 2000.10.22 - Added load time autodetection of
+ Unicode::Map8 supported character set
+ encodings.
+
+ Fixed internal calling error for some
+ character sets with 'from_utf8'. Thanks
+ goes to Ilia Lobsanov
+ <ilia at lobsanov.com> for reporting this
+ problem.
+
+ 1.01 2000.10.02 - Fixed handling of empty strings and
+ added more identification for error
+ messages.
+
+ 1.00 2000.09.29 - Pre-release version
+
+=head1 ´Ø¿ô
+
+=over
+
+=item utf8_charset_alias({ $alias => $charset });
+
+ʸ»ú¥»¥Ã¥ÈÊÌ̾¤Î¼Â¹Ô»þ¤ÎÂåÆþ¤Ë»È¤ï¤ì¤Þ¤¹¡£
+
+°ú¿ô¤Ê¤·¤Ç¸Æ¤Ð¤ì¤ë¤È¡¢ÄêµÁ¤µ¤ì¤Æ¤¤¤ëÊÌ̾¤È¡¢¤½¤ì¤Ë¥Þ¥Ã¥×¤µ¤ì¤ëʸ»ú¥»¥Ã¥È¤Î¥Ï¥Ã¥·¥å¤òÊÖ¤·¤Þ¤¹¡£
+
+Îã¡§:
+
+ my $aliases = utf8_charset_alias;
+ my @alias_names = keys %$aliases;
+
+£±¤Ä¤Î¥Ñ¥é¥á¡¼¥¿ÉÕ¤¤Ç¸Æ¤Ð¤ì¤ë¤È¡¢¤â¤·¤½¤ÎÊÌ̾¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢'ËÜÅö¤Î'ʸ»ú¥»¥Ã¥È¤Î̾Á°¤òÊÖ¤·¤Þ¤¹¡£¤½¤ì¤¬ÊÌ̾¤Ë¸«¤Ä¤«¤é¤Ê¤±¤ì¤Ðundef¤òÊÖ¤·¤Þ¤¹¡£
+
+Îã¡§
+
+ if (! utf8_charset_alias('VISCII')) {
+ # No alias for this
+ }
+
+¤â¤·'alias' => 'charset'¤ÎÁȤΥꥹ¥È¤Ç¸Æ¤Ð¤ì¤ì¤Ð¡¢¤½¤ì¤é¤ÎÊÌ̾¤¬»È¤¨¤ë¤è¤¦¤ËÄêµÁ¤·¤Þ¤¹¡£
+
+Îã¡§
+
+ utf8_charset_alias({ 'japanese' => 'sjis', 'japan' => 'sjis' });
+
+Ãí°Õ¡§ÅϤµ¤ì¤¿ÁȤ¬¡¢Í½¤áÄêµÁ¤µ¤ì¤Æ¤¤¤ëʸ»ú¥»¥Ã¥È¡¦¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Î½¸¹ç¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ëʸ»ú¥»¥Ã¥È¤Ë¥Þ¥Ã¥×¤µ¤ì¤Ê¤±¤ì¤Ð¡¢croak¤·¤Þ¤¹¡£¤³¤ì¤Ï¾¤ÎÊÌ̾¤Ø¤ÎÊÌ̾¤òµö¤·¤Æ¤Ï¤¤¤Þ¤»¤ó¡£
+
+Ê£¿ô¤Îʸ»ú¥»¥Ã¥È¤ò£±²ó¤Î¸Æ½Ð¤·¤ÇÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤¤Þ¤¹¡£
+
+ÊÌ̾¤ò¥¯¥ê¡¼¥ó¤¹¤ë¤¿¤á¤Ë¤Ï¡¢undef¤Îʸ»ú¥»¥Ã¥È¥Þ¥Ã¥Ô¥ó¥°¤òÅϤ·¤Þ¤¹¡£
+
+Îã¡§
+
+ utf8_charset_alias({ 'japanese' => undef });
+
+ÊÌ̾¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë´Ö¡¢¤â¤·Í½¤áÄêµÁ¤µ¤ì¤Æ¤¤¤ëʸ»ú¥»¥Ã¥È¤Ç¤¢¤ì¤Ð¡¢'utf8_supported_charset' ´Ø¿ô¤ÏÊÌ̾¤òÊÖ¤·¤Þ¤¹¡£
+
+´ðËܤÎÄêµÁ¤µ¤ì¤¿Ê¸»ú¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤òÊÌ̾¤Ç¥ª¡¼¥Ð¡¼¥é¥¤¥É¤¹¤ë¤È¡¢É¸½à¥¨¥é¡¼¡ÊSTDERR)¤Ø¤Î·Ù¹ð¥á¥Ã¥»¡¼¥¸¤ò½Ð¤·¤Þ¤¹¡£
+
+=back
+
+=over
+
+=item utf8_supported_charset($charset_name);
+
+¡Ê¥æ¡¼¥¶¤¬ÄêµÁ¤·¤¿ÊÌ̾¤â´Þ¤á¤Æ¡Ë̾¤Å¤±¤é¤ì¤¿Ê¸»ú¥»¥Ã¥È¤¬¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ì¤Ðtrue¤òÊÖ¤·¤Þ¤¹¡£<p>¤½¤¦¤Ç¤Ê¤±¤ì¤Ðfalse¤òÊÖ¤·¤Þ¤¹¡£
+
+Îã¡§
+
+ if (! utf8_supported_charset('VISCII')) {
+ # ¤Þ¤À¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó
+ }
+
+¥Ñ¥é¥á¡¼¥¿¤Ê¤·¤Ç¡¢¥ê¥¹¥È¡¦¥³¥ó¥Æ¥¥¹¥È¤Ç¸Æ¤Ð¤ì¤ë¤È¡¢¡Ê¥æ¡¼¥¶¤¬ÄêµÁ¤·¤¿ÊÌ̾¤â´Þ¤á¤Æ¡Ë¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Îʸ»ú¥»¥Ã¥È̾¤Î¥ê¥¹¥È¤òÊÖ¤·¤Þ¤¹¡£
+
+Îã¡§
+
+ my @charsets = utf8_supported_charset;
+
+=back
+
+=over
+
+=item to_utf8({ -string => $string, -charset => $source_charset });
+
+»ØÄꤵ¤ì¤¿¸µ¤Îʸ»ú¥»¥Ã¥È(source charset)¤«¤éUTF8¤ËÊÑ´¹¤µ¤ì¤¿Ê¸»úÎó¤òÊÖ¤·¤Þ¤¹¡£
+
+=back
+
+=over
+
+=item from_utf8({ -string => $string, -charset => $target_charset});
+
+UTF8¤«¤é»ØÄꤵ¤ì¤¿¥¿¡¼¥²¥Ã¥È¤Îʸ»ú¥»¥Ã¥È(target charset)¤ËÊÑ´¹¤µ¤ì¤¿Ê¸»úÎó¤òÊÖ¤·¤Þ¤¹¡£
+
+=back
+
+=head1 ¥Ð¡¼¥¸¥ç¥ó
+
+1.11 - 2005.10.10
+
+=head1 ¤ä¤ë¤Ù¤¤³¤È
+
+Jcode¡¢2¥Ð¥¤¥È¡¦¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤½¤·¤Æ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°ÊÌ̾¤Î¤¿¤á¤ÎµÕ¹Ô¥Æ¥¹¥È
+
+=head1 »²¹Í»ñÎÁ
+
+L<Unicode::String> L<Unicode::Map8> L<Unicode::Map> L<Jcode>
+
+=head1 Ãøºî¸¢
+
+Copyright 2000-2005, Benjamin Franz. All rights reserved.
+
+=head1 ºî¼Ô
+
+Benjamin Franz <snowhare at nihongo.org>
+
+=head1 ¥¯¥ì¥¸¥Ã¥È
+
+Àî¹ç¹§Åµ "Kawai,Takanori" <GCD00051 at nifty.ne.jp> - Ë®Ìõ
+
+=head1 ¥é¥¤¥»¥ó¥¹
+
+Perl ¤ÈƱ¤¸¥é¥¤¥»¥ó¥¹¡Ê Artistic License ¤È GPL ¤Î¥Ç¥å¥¢¥ë¥é¥¤¥»¥ó¥¹¡Ë
+
+¡Ê¸¶Ê¸¤Î¤Þ¤Þ¡Ë
+
+This program is free software; you can redistribute it
+and/or modify it under the same terms and conditions as
+Perl itself.
+
+This means that you can, at your option, redistribute it and/or modify it under
+either the terms the GNU Public License (GPL) version 1 or later, or under the
+Perl Artistic License.
+
+See http://dev.perl.org/licenses/
+
+=head1 DISCLAIMER
+
+¡Ê¸¶Ê¸¤Î¤Þ¤Þ¡Ë
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE.
+
+Use of this software in any way or in any form, source or binary,
+is not allowed in any country which prohibits disclaimers of any
+implied warranties of merchantability or fitness for a particular
+purpose or any disclaimers of a similar nature.
+
+IN NO EVENT SHALL I BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OF THIS SOFTWARE AND ITS DOCUMENTATION (INCLUDING, BUT NOT
+LIMITED TO, LOST PROFITS) EVEN IF I HAVE BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE
+
+=cut
Added: packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.ja_JP.utf8.pod
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.ja_JP.utf8.pod 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/pod/MapUTF8.ja_JP.utf8.pod 2006-02-02 19:35:47 UTC (rev 2075)
@@ -0,0 +1,258 @@
+
+=head1 åå
+
+Unicode::MapUTF8 - ä»»æã®æåã»ããããï¼ã¸ã®UTF8ã®å¤æ
+
+=head1 æ¦è¦
+
+ use Unicode::MapUTF8 qw(to_utf8 from_utf8 utf8_supported_charset);
+
+ # 'ISO-8859-1'ã®æååã 'UTF8'ã«å¤æãã
+ my $output = to_utf8({ -string => 'An example', -charset => 'ISO-8859-1' });
+
+ # 'UTF8'ã¨ã³ã³ã¼ãã£ã³ã°ã®æååãã¨ã³ã³ã¼ãã£ã³ã° 'ISO-8859-1'ã¸å¤æãã
+ my $other = from_utf8({ -string => 'Other text', -charset => 'ISO-8859-1' });
+
+ # å©ç¨ã§ããæåã»ããã¨ã³ã³ã¼ãã£ã³ã°ã®ãªã¹ã
+ my @character_sets = utf8_supported_charset;
+
+ # æåã»ããå¥åã®è¿½å
+ utf8_charset_alias({ 'ms-japanese' => 'sjis' });
+
+ # ï¼ã¤ã®ä»»æã®ï¼ããã大ããäºææ§ã®ããï¼æåã»ããã¨ã³ã³ã¼ãã£ã³ã°ã§ã®å¤æ
+ # (SJIS to EUC-JP)
+ my $utf8_string = to_utf8({ -string =>$sjis_string, -charset => 'sjis'});
+ my $euc_jp_string = from_utf8({ -string => $utf8_string, -charset => 'euc-jp' })
+
+ # ç¹å®ã®æåã»ããããµãã¼ãããã¦ãããã確èª
+ if (utf8_supported_charset('ISO-8859-1') {
+ # Yes
+ }
+
+=head1 説æ
+
+UTF8ã¨ãã®ä»ã®ã¨ã³ã³ã¼ãã£ã³ã°ããï¼ã¸ã®å¤æã®ããã®ä¸æ ¸ã¨ãªãã«ã¼ãã³ã®éã®ã¢ããã¿å±¤ãæä¾ãã¾ããæ¬è³ªçã«ã¯ãè¤æ°åå¨ãã
+Unicodeã¢ã¸ã¥ã¼ã«ã¸ã®ï¼ã¤ã®å
±éã®ã¤ã³ã¿ã¼ãã§ã¼ã¹ã䏿·ãã«ãªã£ã¦ããå®è£
ãç¥ããã¨ãªããç°¡åã«UTF8ããï¼ã¸ä»ã®æåã»ããã¨ã³ã³ã¼ãã£
+ã³ã°å¤æãç°¡åã«ãããªãã¾ãããã®ãããããã¯Unicode::StringãUnicode::Map8ãUnicode::MapãJcodeã¢
+ã¸ã¥ã¼ã«ãæ¨æºåãããç°¡åãªAPIã®ä¸ã«å
ã¿ã¾ãã
+
+ã¾ãããã¯UTF-8ããã¼ã¹ã«ä¸è¬çãªæåã»ãã夿ãæä¾ãã¾ãâããã¯ï¼æ®µéã®å¤æã¤ãªãããã¨ã«ãããï¼ã¤ã®äºææ§ãããããµãã¼ãããã¦ããæåã»ããã§å¯è½ã§ãã
+
+ã»ã¨ãã©ã®ãã¨ãPerlçãªã®ã§âãã¿ç ã対象ã¨ãã¦æ°å¤ãã®å°ãããªãã®ã®ä»£ããã«ï¼ãï¼ã®å¤§ããªåºã¾ããä¸ããã¨ã1ç§éã«ããå¤ãã®æåãæ±ãã¾ãã
+
+è¨è¨ã§ã¯ãç»å ´ãããããªãæ°ããæåã»ããã»ã¨ã³ã³ã¼ãã£ã³ã°å¤æã¢ã¸ã¥ã¼ã«ãåãè¾¼ãããã«ç°¡åã«æ¡å¼µãããã¨ãã§ãã¾ãã
+
+=head1 夿´ç¹
+
+ï¼åæã®ã¾ã¾ï¼
+
+ 1.11 2005.10.10 Documentation changes. Addition of Build.PL support.
+ Added various build tests, LICENSE, Artistic_License.txt,
+ GPL_License.txt. Split documentation into seperate
+ .pod file. Added Japanese translation of POD.
+
+ 1.10 2005.05.22 - Fixed bug in conversion of ISO-2022-JP to UTF-8.
+ Problem and fix found by Masahiro HONMA
+ <masahiro.honma at tsutaya.co.jp>.
+
+ Similar bugs in conversions of shift_jis and euc-jp
+ to UTF-8 fixed as well.
+
+ 1.09 2001.08.22 - Fixed multiple typo occurances of 'uft'
+ where 'utf' was meant in code. Problem affected
+ utf16 and utf7 encodings. Problem found
+ by devon smith <devon at taller.PSCL.cwru.edu>
+
+ 1.08 2000.11.06 - Added 'utf8_charset_alias' function to
+ allow for runtime setting of character
+ set aliases. Added several alternate
+ names for 'sjis' (shiftjis, shift-jis,
+ shift_jis, s-jis, and s_jis).
+
+ Corrected 'croak' messages for
+ 'from_utf8' functions to appropriate
+ function name.
+
+ Tightened up initialization encapsulation
+
+ Corrected fatal problem in jcode from
+ unicode internals. Problem and fix
+ found by Brian Wisti <wbrian2 at uswest.net>.
+
+ 1.07 2000.11.01 - Added 'croak' to use Carp declaration to
+ fix error messages. Problem and fix
+ found by Brian Wisti
+ <wbrian2 at uswest.net>.
+
+ 1.06 2000.10.30 - Fix to handle change in stringification
+ of overloaded objects between Perl 5.005
+ and 5.6. Problem noticed by Brian Wisti
+ <wbrian2 at uswest.net>.
+
+ 1.05 2000.10.23 - Error in conversions from UTF8 to
+ multibyte encodings corrected
+
+ 1.04 2000.10.23 - Additional diagnostic messages added
+ for internal error conditions
+
+ 1.03 2000.10.22 - Bug fix for load time autodetction of
+ Unicode::Map8 encodings
+
+ 1.02 2000.10.22 - Added load time autodetection of
+ Unicode::Map8 supported character set
+ encodings.
+
+ Fixed internal calling error for some
+ character sets with 'from_utf8'. Thanks
+ goes to Ilia Lobsanov
+ <ilia at lobsanov.com> for reporting this
+ problem.
+
+ 1.01 2000.10.02 - Fixed handling of empty strings and
+ added more identification for error
+ messages.
+
+ 1.00 2000.09.29 - Pre-release version
+
+=head1 颿°
+
+=over
+
+=item utf8_charset_alias({ $alias => $charset });
+
+æåã»ããå¥åã®å®è¡æã®ä»£å
¥ã«ä½¿ããã¾ãã
+
+弿°ãªãã§å¼ã°ããã¨ãå®ç¾©ããã¦ããå¥åã¨ãããã«ããããããæåã»ããã®ããã·ã¥ãè¿ãã¾ãã
+
+ä¾ï¼:
+
+ my $aliases = utf8_charset_alias;
+ my @alias_names = keys %$aliases;
+
+ï¼ã¤ã®ãã©ã¡ã¼ã¿ä»ãã§å¼ã°ããã¨ããããã®å¥åãå®ç¾©ããã¦ããã°ã'æ¬å½ã®'æåã»ããã®ååãè¿ãã¾ãããããå¥åã«è¦ã¤ãããªããã°undefãè¿ãã¾ãã
+
+ä¾ï¼
+
+ if (! utf8_charset_alias('VISCII')) {
+ # No alias for this
+ }
+
+ãã'alias' => 'charset'ã®çµã®ãªã¹ãã§å¼ã°ããã°ããããã®å¥åã使ããããã«å®ç¾©ãã¾ãã
+
+ä¾ï¼
+
+ utf8_charset_alias({ 'japanese' => 'sjis', 'japan' => 'sjis' });
+
+注æï¼æ¸¡ãããçµããäºãå®ç¾©ããã¦ããæåã»ããã»ã¨ã³ã³ã¼ãã£ã³ã°ã®éåã«å®ç¾©ããã¦ããæåã»ããã«ããããããªããã°ãcroakãã¾ããããã¯ä»ã®å¥åã¸ã®å¥åã許ãã¦ã¯ãã¾ããã
+
+è¤æ°ã®æåã»ãããï¼åã®å¼åºãã§è¨å®ãããã¨ãã§ãã¾ãã
+
+å¥åãã¯ãªã¼ã³ããããã«ã¯ãundefã®æåã»ãããããã³ã°ã渡ãã¾ãã
+
+ä¾ï¼
+
+ utf8_charset_alias({ 'japanese' => undef });
+
+å¥åãè¨å®ããã¦ããéãããäºãå®ç¾©ããã¦ããæåã»ããã§ããã°ã'utf8_supported_charset' 颿°ã¯å¥åãè¿ãã¾ãã
+
+åºæ¬ã®å®ç¾©ãããæåã¨ã³ã³ã¼ãã£ã³ã°ãå¥åã§ãªã¼ãã¼ã©ã¤ãããã¨ãæ¨æºã¨ã©ã¼ï¼STDERR)ã¸ã®è¦åã¡ãã»ã¼ã¸ãåºãã¾ãã
+
+=back
+
+=over
+
+=item utf8_supported_charset($charset_name);
+
+ï¼ã¦ã¼ã¶ãå®ç¾©ããå¥åãå«ãã¦ï¼åã¥ããããæåã»ããããµãã¼ãããã¦ããã°trueãè¿ãã¾ãã<p>ããã§ãªããã°falseãè¿ãã¾ãã
+
+ä¾ï¼
+
+ if (! utf8_supported_charset('VISCII')) {
+ # ã¾ã ãµãã¼ãããã¦ãã¾ãã
+ }
+
+ãã©ã¡ã¼ã¿ãªãã§ããªã¹ãã»ã³ã³ããã¹ãã§å¼ã°ããã¨ãï¼ã¦ã¼ã¶ãå®ç¾©ããå¥åãå«ãã¦ï¼ãµãã¼ãããã¦ãããã¹ã¦ã®æåã»ããåã®ãªã¹ããè¿ãã¾ãã
+
+ä¾ï¼
+
+ my @charsets = utf8_supported_charset;
+
+=back
+
+=over
+
+=item to_utf8({ -string => $string, -charset => $source_charset });
+
+æå®ãããå
ã®æåã»ãã(source charset)ããUTF8ã«å¤æãããæååãè¿ãã¾ãã
+
+=back
+
+=over
+
+=item from_utf8({ -string => $string, -charset => $target_charset});
+
+UTF8ããæå®ãããã¿ã¼ã²ããã®æåã»ãã(target charset)ã«å¤æãããæååãè¿ãã¾ãã
+
+=back
+
+=head1 ãã¼ã¸ã§ã³
+
+1.11 - 2005.10.10
+
+=head1 ããã¹ããã¨
+
+Jcodeã2ãã¤ãã»ã¨ã³ã³ã¼ãã£ã³ã°ããã¦ã¨ã³ã³ã¼ãã£ã³ã°å¥åã®ããã®éè¡ãã¹ã
+
+=head1 åèè³æ
+
+L<Unicode::String> L<Unicode::Map8> L<Unicode::Map> L<Jcode>
+
+=head1 è使¨©
+
+Copyright 2000-2005, Benjamin Franz. All rights reserved.
+
+=head1 ä½è
+
+Benjamin Franz <snowhare at nihongo.org>
+
+=head1 ã¯ã¬ã¸ãã
+
+å·ååå
¸ "Kawai,Takanori" <GCD00051 at nifty.ne.jp> - é¦è¨³
+
+=head1 ã©ã¤ã»ã³ã¹
+
+Perl ã¨åãã©ã¤ã»ã³ã¹ï¼ Artistic License 㨠GPL ã®ãã¥ã¢ã«ã©ã¤ã»ã³ã¹ï¼
+
+ï¼åæã®ã¾ã¾ï¼
+
+This program is free software; you can redistribute it
+and/or modify it under the same terms and conditions as
+Perl itself.
+
+This means that you can, at your option, redistribute it and/or modify it under
+either the terms the GNU Public License (GPL) version 1 or later, or under the
+Perl Artistic License.
+
+See http://dev.perl.org/licenses/
+
+=head1 DISCLAIMER
+
+ï¼åæã®ã¾ã¾ï¼
+
+THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS
+OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE.
+
+Use of this software in any way or in any form, source or binary,
+is not allowed in any country which prohibits disclaimers of any
+implied warranties of merchantability or fitness for a particular
+purpose or any disclaimers of a similar nature.
+
+IN NO EVENT SHALL I BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OF THIS SOFTWARE AND ITS DOCUMENTATION (INCLUDING, BUT NOT
+LIMITED TO, LOST PROFITS) EVEN IF I HAVE BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE
+
+=cut
Modified: packages/libunicode-maputf8-perl/branches/upstream/current/t/01_unicode_maputf8.t
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/t/01_unicode_maputf8.t 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/t/01_unicode_maputf8.t 2006-02-02 19:35:47 UTC (rev 2075)
@@ -2,6 +2,7 @@
use strict;
use lib ('./blib','../blib','../lib','./lib');
+#use bytes;
use Unicode::MapUTF8 qw(utf8_supported_charset to_utf8 from_utf8 utf8_charset_alias);
# General info for writing test modules:
@@ -13,11 +14,12 @@
my @do_tests=(1..5);
my $test_subs = {
- 1 => { -code => \&test1, -desc => ' eight-bit ' },
- 2 => { -code => \&test2, -desc => ' unicode ' },
- 3 => { -code => \&test3, -desc => ' multi-byte ' },
- 4 => { -code => \&test4, -desc => ' jcode ' },
- 5 => { -code => \&test5, -desc => ' charset aliases ' },
+ 1 => { -code => \&test1, -desc => ' eight-bit ' },
+ 2 => { -code => \&test2, -desc => ' unicode ' },
+ 3 => { -code => \&test3, -desc => ' multi-byte ' },
+ 4 => { -code => \&test4, -desc => ' jcode ' },
+ 5 => { -code => \&test5, -desc => ' charset aliases ' },
+# 6 => { -code => \&big5_with_embedded_ascii, -desc => ' big5 embedded ascii ' },
};
my @charsets = utf8_supported_charset;
@@ -182,6 +184,38 @@
}
########################################
+# Test Big5 with embedded ASCII #
+########################################
+sub big5_with_embedded_ascii {
+ my $charset = 'big5';
+
+ my @errors = ();
+ {
+ my $source_string = "\xa5\x40\xa5\x41\x30";
+ my $utf8_string = to_utf8({ -charset => "ucs2", -string => "\x4e\x16\x4e\x15\x00\x30"});
+ my $result = test_general({ -charset => $charset,
+ -source => $source_string,
+ -utf8 => $utf8_string,
+ });
+ push(@errors,$result) if ($result ne '');
+ }
+
+ {
+ my $source_string = "\xa5\x40\xa5\x41\x30\xa5\x30\x41\xa5\x40";
+ my $utf8_string = to_utf8({ -charset => "ucs2", -string => "\x4e\x16\x4e\x15\x00\x30\x00\x41\x4e\x16"});
+ my $result = test_general({ -charset => $charset,
+ -source => $source_string,
+ -utf8 => $utf8_string,
+ });
+ push(@errors,$result) if ($result ne '');
+ }
+ if (0 < @errors) {
+ return join('', at errors);
+ }
+ return '';
+}
+
+########################################
# Generalized test framework #
########################################
@@ -195,16 +229,16 @@
my $result_string = to_utf8({ -string => $source_string,
-charset => $source_charset });
if ($utf8_string ne $result_string) {
- die ('(line ' . __LINE__ . ") conversion from '$source_charset' to UTF8 resulted in unexpected output. Expected '" . hexout($utf8_string) . "' but got '" . hexout($result_string) . "'\n");
+ die ('(line ' . __LINE__ . ") conversion from '$source_charset' to UTF8 resulted in unexpected output.\nExpected '" . hexout($utf8_string) . "' but got '" . hexout($result_string) . "'\n");
}
};
- if ($@) { return "Failed to convert UTF8 text to $source_charset: $@" }
+ if ($@) { return "Failed to convert UTF8 text to $source_charset:\n$@" }
eval {
my $result_string = from_utf8({ '-string' => $utf8_string,
'-charset' => $source_charset,
});
if ($source_string ne $result_string) {
- die ("conversion from UTF8 to '$source_charset' resulted in unexpected output. Expected '" . hexout($source_string) . "' but got '" . hexout($result_string) . "'\n");
+ die ("conversion from UTF8 to '$source_charset' resulted in unexpected output.\nExpected '" . hexout($source_string) . "' but got '" . hexout($result_string) . "'\n");
}
};
if ($@) { return "Failed to convert '$source_charset' text to UTF8: $@" }
Added: packages/libunicode-maputf8-perl/branches/upstream/current/t/97_distribution.t
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/t/97_distribution.t 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/t/97_distribution.t 2006-02-02 19:35:47 UTC (rev 2075)
@@ -0,0 +1,19 @@
+use strict;
+
+use lib ('./blib','../blib', './lib', '../lib');
+
+eval {
+ require Test::More;
+};
+if ($@) {
+ $|++;
+ print "1..0 # Skipped: Test::More required for testing distribution\n";
+ exit;
+}
+eval {
+ require Test::Distribution;
+};
+if ($@) {
+ Test::More::plan( skip_all => 'Test::Distribution not installed' );
+}
+Test::Distribution->import('only' => [qw(prereq sig description)]);
Added: packages/libunicode-maputf8-perl/branches/upstream/current/t/98_pod_coverage.t
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/t/98_pod_coverage.t 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/t/98_pod_coverage.t 2006-02-02 19:35:47 UTC (rev 2075)
@@ -0,0 +1,22 @@
+use strict;
+
+use lib ('./blib','../blib', './lib', '../lib');
+
+eval {
+ require Test::More;
+};
+if ($@) {
+ $|++;
+ print "1..0 # Skipped: Test::More required for testing POD coverage\n";
+ exit;
+}
+eval {
+ require Test::Pod::Coverage;
+};
+if ($@ or (not defined $Test::Pod::Coverage::VERSION) or ($Test::Pod::Coverage::VERSION < 1.06)) {
+ Test::More::plan (skip_all => "Test::Pod::Coverage 1.06 required for testing POD coverage");
+ exit;
+}
+
+Test::More::plan (tests => 1);
+Test::Pod::Coverage::pod_coverage_ok( 'Unicode::MapUTF8', { also_private => ['DEBUG'] });
Added: packages/libunicode-maputf8-perl/branches/upstream/current/t/99_pod.t
===================================================================
--- packages/libunicode-maputf8-perl/branches/upstream/current/t/99_pod.t 2006-02-02 19:31:14 UTC (rev 2074)
+++ packages/libunicode-maputf8-perl/branches/upstream/current/t/99_pod.t 2006-02-02 19:35:47 UTC (rev 2075)
@@ -0,0 +1,19 @@
+eval {
+ require Test::More;
+};
+if ($@) {
+ $|++;
+ print "1..0 # Skipped: Test::More required for testing POD. Skipping.\n";
+ exit;
+}
+
+eval {
+ require Test::Pod;
+};
+if ($@ or (not defined $Test::Pod::VERSION) or ($Test::Pod::VERSION < 1.00)) {
+ Test::More::plan (skip_all => "Test::Pod 1.00 required for testing POD");
+ exit;
+}
+
+Test::Pod::all_pod_files_ok();
+
More information about the Pkg-perl-cvs-commits
mailing list