[Tokyo.pm] utf8 & perl5.6

simon.p.cozens @ jp.pwcglobal.com simon.p.cozens @ jp.pwcglobal.com
2000年 4月 27日 (木) 20:29:30 CDT


カズンズです

> $encode = XML::UM::get_encode(Encoding => 'big5');
> $encoded_string = $encode($utf8_string);
                           ^ ->, かしら。

うんん、出来ればいい。今やっているline disciplineというもので、
こういうことができます:

open FH, ":decompress :utf8 :tobig5", "unicode-data.gz" or die $!;

まだ終わりませんでしたが、とりあえずUTF8でファイルを読めるような
パッチもあります:

open FH, $file or die $!;
binmode FH, ":utf8";
while (<FH>) {
     ...
}

これたぶん5.6.1に登場しますが、line disciplineのほうが5.8.0.

サイモン

__END__
----------------------------------------------------------------
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.





Tokyo-pm メーリングリストの案内