Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2011
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.54 KB | None | 0 0
  1.     # unescaped value must be 'абв, где'
  2.     # Escaped value, line #132
  3.     if (index($value, '%') >= 0) {
  4.       print "$charset\n";           # 'utf-8'
  5.       print "$value\n";             # %D0%B0%D0%B1%D0%B2%2C %D0%B3%D0%B4%D0%B5
  6.       url_unescape $value;
  7.       print "$value\n";             # абв, ??????
  8.       print Data::Dumper->Dumper($value)."\n";  # $VAR2 = "\x{430}\x{431}\x{432}, \x{fffd}\x{fffd}\x{fffd}\x{fffd}\x{fffd}\x{fffd}";
  9.       my $backup = $value;
  10.       decode $charset, $value if $charset;
  11.       $value = $backup unless defined $value;
  12.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement