in reply to Re^6: Malformed UTF-8
in thread Malformed UTF-8
Note that this runs fine (i.e. no match, no error) on my system (5.8.8 built for i686-linux-thread-multi).use strict; use warnings; use Devel::Peek 'Dump'; my $token = "ba\x{f1}o"; utf8::upgrade($token); # force utf-8 encoding and flag. my $term = "ba\303\261o"; # "utf-8 encoded" but no flag. warn "Token:\n"; Dump($token); warn "Term:\n"; Dump($term); print "match\n" if $token =~ /^$term/i;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Malformed UTF-8
by spiros (Beadle) on May 15, 2007 at 17:55 UTC | |
by Joost (Canon) on May 15, 2007 at 18:12 UTC | |
by spiros (Beadle) on May 15, 2007 at 19:58 UTC |