diff options
| author | fukachan <fukachan> | 2001-02-25 06:43:41 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-02-25 06:43:41 +0000 |
| commit | a2cc40f14d32f8f38fff0391d91ea9c0d64315ec (patch) | |
| tree | 0f62e4ed29a02342083a4d8271c63be7a305eb04 /fml/lib/Dialect | |
| parent | 39d104d1caf304a154d3c9f1caa7601152510667 (diff) | |
| download | fml8-a2cc40f14d32f8f38fff0391d91ea9c0d64315ec.tar.gz fml8-a2cc40f14d32f8f38fff0391d91ea9c0d64315ec.tar.bz2 fml8-a2cc40f14d32f8f38fff0391d91ea9c0d64315ec.zip | |
clean up documents
move FML::String to Dialect::ISO2022JP (Dialect::Japanese::String)
Diffstat (limited to 'fml/lib/Dialect')
| -rw-r--r-- | fml/lib/Dialect/ISO2022JP.pm | 32 | ||||
| -rw-r--r-- | fml/lib/Dialect/Japanese/String.pm | 91 | ||||
| -rw-r--r-- | fml/lib/Dialect/Japanese/index.ja.html | 6 |
3 files changed, 124 insertions, 5 deletions
diff --git a/fml/lib/Dialect/ISO2022JP.pm b/fml/lib/Dialect/ISO2022JP.pm index 4e67cfcc..f56f0615 100644 --- a/fml/lib/Dialect/ISO2022JP.pm +++ b/fml/lib/Dialect/ISO2022JP.pm @@ -13,11 +13,7 @@ package Dialect::ISO2022JP; use strict; use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); use Carp; -use Dialect::Japanese::Utils qw(is_iso2022jp_string); -require Exporter; -@ISA = qw(Dialect::Japanese::Utils Exporter); -@EXPORT_OK = @Dialect::Japanese::Utils::EXPORT_OK; =head1 NAME @@ -28,9 +24,35 @@ Dialect::ISO2022JP - adapter for Dialect::Japanese use Dialect::ISO2022JP qw(is_iso2022jp_string); if ( is_iso2022jp_string($string) ) { do_something_if_Japanese;} + use Dialect::ISO2022JP qw(STR2EUC); + $euc_string = STR2EUC( $string ); + +=cut + + +use Dialect::Japanese::Utils qw(is_iso2022jp_string); +use Dialect::Japanese::String qw(STR2JIS STR2EUC STR2SJIS); + +require Exporter; +@ISA = qw(Dialect::Japanese::Utils Dialect::Japanese::String Exporter); +push(@EXPORT_OK, @Dialect::Japanese::Utils::EXPORT_OK); +push(@EXPORT_OK, @Dialect::Japanese::String::EXPORT_OK); + + +=head1 METHODS + +=head2 C<is_iso2022jp_string> + +See L<Dialect::Japanese::Utils> + +=head2 C<STR2JIS> C<STR2EUC> C<STR2SJIS> + +See L<Dialect::Japanese::String> + =head1 SEE ALSO -L<Dialect::Japanese> +L<Dialect::Japanese::Utils>, +L<Dialect::Japanese::String> =head1 AUTHOR diff --git a/fml/lib/Dialect/Japanese/String.pm b/fml/lib/Dialect/Japanese/String.pm new file mode 100644 index 00000000..4e748e4b --- /dev/null +++ b/fml/lib/Dialect/Japanese/String.pm @@ -0,0 +1,91 @@ +#-*- perl -*- +# +# Copyright (C) 2000 Ken'ichi Fukamachi +# All rights reserved. This program is free software; you can +# redistribute it and/or modify it under the same terms as Perl itself. +# +# $Id$ +# $FML$ +# + +package Dialect::Japanese::String; +use strict; +use Carp; +use vars qw(@ISA @EXPORT @EXPORT_OK); + +=head1 NAME + +Dialect::Japanese::String -- utilities to manipulate strings + +=head1 SYNOPSIS + + use Dialect::Japanese::String qw(STR2JIS); + $euc_str = STR2JIS($str); + +=head1 METHOD + +=head2 C<STR2JIS(string)> + +convert CHARSET of the given string to JIS. + +=head2 C<STR2EUC(string)> + +convert CHARSET of the given string to EUC. + +=head2 C<STR2SJIS(string)> + +convert CHARSET of the given string to SJIS. + +=cut + + +require Exporter; +@ISA = qw(Exporter); +@EXPORT_OK = qw(STR2JIS STR2EUC STR2SJIS); + +use Jcode; + + +sub STR2EUC +{ + my ($str) = @_; + &Jcode::convert(\$str, 'euc'); + $str; +} + + +sub STR2JIS +{ + my ($str) = @_; + &Jcode::convert(\$str, 'jis'); + $str; +} + + +sub STR2SJIS +{ + my ($str) = @_; + &Jcode::convert(\$str, 'sjis'); + $str; +} + + +=head1 AUTHOR + +Ken'ichi Fukamachi + +=head1 COPYRIGHT + +Copyright (C) 2001 Ken'ichi Fukamachi + +All rights reserved. This program is free software; you can +redistribute it and/or modify it under the same terms as Perl itself. + +=head1 HISTORY + +Dialect::Japanese::String appeared in fml5 mailing list driver package. +See C<http://www.fml.org/> for more details. + +=cut + +1; diff --git a/fml/lib/Dialect/Japanese/index.ja.html b/fml/lib/Dialect/Japanese/index.ja.html index 8ec9e260..cb59d549 100644 --- a/fml/lib/Dialect/Japanese/index.ja.html +++ b/fml/lib/Dialect/Japanese/index.ja.html @@ -14,6 +14,12 @@ Dialect/Japanese::* classes <TABLE BRODER=4> <TR> <TD> + Dialect::Japanese::String <TD> +<A HREF="String.pm">[source]</A> +<TD> +<A HREF="@@doc/String.txt">[doc]</A> +<TR> +<TD> Dialect::Japanese::Subject <TD> <A HREF="Subject.pm">[source]</A> <TD> |
