NAME

IOas::SJIS2004 - provides SJIS2004 I/O subroutines for UTF-8 script

SYNOPSIS

use IOas::SJIS2004;

  # Octet Length as I/O Encoding
  $result = IOas::SJIS2004::length($utf8str);
  $result = IOas::SJIS2004::sprintf($utf8format, @utf8list);
  $result = IOas::SJIS2004::substr($utf8expr, $offset_as_cp932x, $length_as_cp932x, $utf8replacement);

  # String Comparison as I/O Encoding
  $result = IOas::SJIS2004::cmp($utf8str_a, $utf8str_b);
  $result = IOas::SJIS2004::eq($utf8str_a, $utf8str_b);
  $result = IOas::SJIS2004::ne($utf8str_a, $utf8str_b);
  $result = IOas::SJIS2004::ge($utf8str_a, $utf8str_b);
  $result = IOas::SJIS2004::gt($utf8str_a, $utf8str_b);
  $result = IOas::SJIS2004::le($utf8str_a, $utf8str_b);
  $result = IOas::SJIS2004::lt($utf8str_a, $utf8str_b);
  $result = IOas::SJIS2004::sort(@utf8str);

  # Encoding Convert on I/O Operations
  $result = IOas::SJIS2004::getc(FILEHANDLE);
  $result = IOas::SJIS2004::readline(FILEHANDLE);
  $result = IOas::SJIS2004::print(FILEHANDLE, @utf8str);
  $result = IOas::SJIS2004::printf(FILEHANDLE, $utf8format, @utf8list);

Count Length by

--------------------------------------------------------
count by    count by              count by octet
octet       UTF-8 codepoint       in I/O encoding
--------------------------------------------------------
length      UTF8::R2::length      IOas::SJIS2004::length
sprintf                           IOas::SJIS2004::sprintf
substr      UTF8::R2::substr      IOas::SJIS2004::substr
--------------------------------------------------------

Compare String by

--------------------------------------------------------
compare by                        compare by
script encoding                   I/O encoding
--------------------------------------------------------
cmp                               IOas::SJIS2004::cmp
eq                                IOas::SJIS2004::eq
ne                                IOas::SJIS2004::ne
ge                                IOas::SJIS2004::ge
gt                                IOas::SJIS2004::gt
le                                IOas::SJIS2004::le
lt                                IOas::SJIS2004::lt
sort                              IOas::SJIS2004::sort
--------------------------------------------------------

I/O Operations

--------------------------------------------------------
raw I/O     I/O operations        I/O operations
operations  in UTF-8 encoding     with encoding convert
--------------------------------------------------------
getc        UTF8::R2::getc        IOas::SJIS2004::getc
<FILE>                            IOas::SJIS2004::readline
print                             IOas::SJIS2004::print
printf                            IOas::SJIS2004::printf
--------------------------------------------------------

AUTHOR

INABA Hitoshi <ina@cpan.org>

This project was originated by INABA Hitoshi.

LICENSE AND COPYRIGHT

This software is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.