# Unicode characters in mailto address hyperref links

I am trying to make names with special Danish characters in email addresses look right in the email the address in a hyperref link in the document compiled to PDF. I have attempted:

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[unicode]{hyperref}

\begin{document}

\end{document}


I found and tried this answer: https://stackoverflow.com/a/4697003/865169 and this: https://tex.stackexchange.com/a/111796/13780 to fix it, with no luck. The link in the resulting PDF file turns out mailto:Ole-Bent Kj\T1\ae r <some.address@some.domain.dk>. Is this a PDF problem that I cannot solve from LaTeX?

• I don't think the issue here is mailto: as you see the same with æ (or \ae) in a standard link. I suspect that only some chars can be handled by the unicode option within hyperlinks (although the same char seems to be fine in the TOC bookmarks). I can't find any comment on the coverage in the docs, so I guess we need Heiko to answer! – Joseph Wright Sep 16 '14 at 10:32

As mailto: is a URI scheme, the rules for handling special characters are identical to those for URLs, which themselves also are URIs. Therefore one can use the so-called percent-encoding, which substitutes special characters by sequences of a percent sign followed by its UTF-8 byte sequence. For æ, this byte sequence is C3 A6, therefore its percent encoding would be %C3%A6. But as LaTeX takes the percent sign for the beginning of a comment, one has to escape it with a backslash, as well. After these steps, the result is the following:
\href{mailto:Ole-Bent Kj\%C3\%A6r <some.address@some.domain.dk>}{some.address}@some.domain.dk

Now, if the link is hovered over or clicked, the correct æ will show instead of \%C3\%A6.
• Actually it even works without escaping the percent signs, i. e., Kj%C3%A6r is also an option. – brian-ammon Sep 16 '14 at 10:35