Also, what is your opinion on the appropriateness of including handling of UTF-16 surrogate pairs in a URI percent-encoding solution? CGI.pm and URI::Escape::XS do this (using code from the same author). I wan to further clarify what the bug is here. According to the Perl docs is it against best practices to check the UTF-8 flag. Instead the programmer should keep track of the encodings of her str