The following document generates some URLs, with and without percent encoding:
\pdfobjcompresslevel=0
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\url{http://lyle.smu.edu/~tspell/jaws}
\href{http://lyle.smu.edu/\%7Etspell/jaws}{%
\nolinkurl{http://lyle.smu.edu/~tspell/jaws}%
}
\url{http://lyle.smu.edu/%7Etspell/jaws}
\end{document}
The PDF file contains:
3 0 obj <<
/Type /Annot
/Border[0 0 1]/H/I/C[0 1 1]
/Rect [147.716 654.025 317.079 665.15]
/Subtype/Link/A<</Type/Action/S/URI/URI(http://lyle.smu.edu/~tspell/jaws)>>
>> endobj
4 0 obj <<
/Type /Annot
/Border[0 0 1]/H/I/C[0 1 1]
/Rect [147.716 642.07 317.079 653.195]
/Subtype/Link/A<</Type/Action/S/URI/URI(http://lyle.smu.edu/%7Etspell/jaws)>>
>> endobj
5 0 obj <<
/Type /Annot
/Border[0 0 1]/H/I/C[0 1 1]
/Rect [147.716 630.115 327.54 641.24]
/Subtype/Link/A<</Type/Action/S/URI/URI(http://lyle.smu.edu/%7Etspell/jaws)>>
>> endobj
The tilde ~ is an unreserved character (RFC 3986) and do not need percent encoding.
Thus the second and third URLs are just for testing.
The URLs work (opening firefox with the correct URL) for the following PDF viewers:
- xpdf 3.00
- AR5/Linux
- AR7/Linux
- AR8/Linux
- Foxit Reader 5.4
- PDF XChange Viewer 2.5
- evince 2.32
- Google Chrome 24 (internal PDF viewer)
However, AR11/Win seems to convert the tilde to percent encoding %7E and to apply the percent encoding again, resulting in the wrong %257E. Therefore it looks like a bug in AR11/Win. Since also the percent encoded URL does not work, I do not know a workaround except using a service like tinyurl to avoid ~ (or other problematic characters).
%7Ethen, but I do not know, where the “25” comes from. – Speravir Jan 15 at 3:40%25is an encoded%character. Something is being encoded twice here. – You Jan 15 at 3:53