Quote:
Originally Posted by tompe
When I open the file I get
Code:
href="book.html%23toc"
Why do I get %23? Why do I not get a #? Is # encoded in a special way in UTF-8?
|
When you see the
href="book.html%23toc", it has nothing to do with UTF-8, but rather is a result of
URL Encoding which removes special punctuation characters from URL's.
In Perl, there is a function that will take an already encoded URL and decode it back to simple ASCII. Please refer to
uri_unescape() which converts a URL encoded string to its normal representation.
Then just post-process any URL link that contains a %
using uni_unescape, if you would rather not deal with this encoding.