This script then behaves as I would expect:


#!/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 for (<F>) { print "1. $_" if /表/ ; print "2. $_" if /\xE8\xA1\xA8/ ; }


Note that if you write use utf8; it will NOT work

Thanks, John


I'll give it a try, soon as I can get 5.8 installed on my iBook. (Running short of disk space, so I've been putting it off.)

Joel (at home)

Reply via email to