> This script then behaves as I would expect:

I'm going to check the behavior later, the clues you gave me are enough
to move me ahead.

> #!/usr/bin/perl
> no warnings ;
> $f = "$ENV{HOME}/Desktop/biao.txt" ; # file saved as UTF-8
> open F, $f or die $! ;
> $/ = "\015" ; # only if the file has Mac line endings !!!
> print "\x{8868}\n\n"; # prints the character as utf-8

Important clue #1. I'd forgotten about the proper form for the unicode
hex notation. 

> for (<F>) {
>    print "1.   $_" if /陦ィ/ ;

(And, of course, that character did not survive the round trip through
the mail systems and MUAs. :-/ )

>    print "2.   $_" if /\xE8\xA1\xA8/ ;
> }
> 
> 
> Note that if you write   use utf8;  it will NOT work

Important clue number two. perldoc utf8 filled in some blanks and
referred me to perlunicode, which answered some more questions, ...

Thanks, John.

-- 
Joel Rees, programmer, Systems Group
Altech Corporation (Alpsgiken), Osaka, Japan
http://www.alpsgiken.co.jp

Reply via email to