danmcb has asked for the wisdom of the Perl Monks concerning the following question:
If I have two strings which represent the same unicode string, like:
stùand
st\x{f9}how can I test for string equality in a robust way? (To give some context, one is coming to the app as a CGI parameter, the other froma database. But essentially, either maybe represented as utf8, or as escape sequences. A robust "eq" is needed.)
update: I have tried :
my $temp = sprintf( "%s", $escaped_string );to try to lose the escaped chars, without success.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: string comparison with escape sequences
by almut (Canon) on Aug 30, 2007 at 18:35 UTC | |
|
Re: string comparison with escape sequences
by kyle (Abbot) on Aug 30, 2007 at 18:44 UTC | |
|
Re: string comparison with escape sequences
by dah (Sexton) on Aug 30, 2007 at 18:20 UTC |