Refer to this question and answer.
When I compile the file below (encoded in utf-8) with pdflatex, only the middle option produces a working link as opposed to all three in the linked question. In addition, the third option doesn't display correctly. Is this a bug in hyperref? I can typeset the ø fine outside the \url command.
I would prefer to use the third option to typeset a link, as it handles linebreaking for me. Is there a workaround or am I doing something wrong?
Is there a way to make \href handle linebreaking like \url does?
MWE:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\begin{document}
\href{https://da.wikisource.org/wiki/Forsøg_over_den_electriske_Vexelkamps_Indvirkning_paa_Magnetnaalen}{https://da.wikisource.org/wiki/Forsøg\_over\_den\_electriske\_Vexelkamps\_Indvirkning\_paa\_Magnetnaalen}
\href{https://da.wikisource.org/wiki/Fors\%C3\%B8g_over_den_electriske_Vexelkamps_Indvirkning_paa_Magnetnaalen}{https://da.wikisource.org/wiki/Forsøg\_over\_den\_electriske\_Vexelkamps\_Indvirkning\_paa\_Magnetnaalen}
\urlstyle{same}
\url{https://da.wikisource.org/wiki/Forsøg_over_den_electriske_Vexelkamps_Indvirkning_paa_Magnetnaalen}
\end{document}

pdflatexversion ispdflatex --versionpdfTeX 3.14159265-2.6-1.40.15 (TeX Live 2014/W32TeX) kpathsea version 6.2.0. I'll update all my packages with TeX Live Manager and try again. – Peter Sep 03 '15 at 18:53@HeikoOberdiek is there a way to use the percent escaped version of the url in the
– Peter Sep 03 '15 at 19:19\urlcommand while displaying the character ø? Or to make hyperref break between lines like\url?\href, e.g.\href{<URL, percent encoded>}{\nolinkurl{<URL>}}. – Heiko Oberdiek Sep 03 '15 at 19:42