![]() |
|
"be consistent" | |
PerlMonks |
Re: validating unicode chars in their smallest formby ikegami (Patriarch) |
on Jun 13, 2010 at 18:23 UTC ( [id://844464]=note: print w/replies, xml ) | Need Help?? |
Compare www.paypаl.com vs www.paypal.com. On this computer, it's impossible to tell that the two strings are different by looking at them. On another computer, it's very hard.
This has nothing to do with Unicode. It's strictly a UTF-8 problem. Since you should decode text before working with it, there's no problem. Take U+00C9. It could be encoded as or as
If you work with the characters in their encoded form, they appear to be two different characters. Once you decode them, you're only dealing with character U+00C9. There's no problem if your decoder works properly. (A quick test shows that Encode only accepts the shortest form. The longer forms are treated as invalid. That's good.)
In Section
Seekers of Perl Wisdom
|
|