6

Possible Duplicate:
Hyperref: Scandinavian characters (æø) don't work in \url, hyperlink is wrong

Consider the following example:

\documentclass[a4paper]{article} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[danish]{babel} \usepackage{url} \usepackage{hyperref} \begin{document} \url{http://da.wikipedia.org/wiki/Topologi} \url{http://da.wikipedia.org/wiki/Topologisk_rum} \url{http://da.wikipedia.org/wiki/Åben_mængde} \url{http://da.wikipedia.org/wiki/Homøomorfi} \url{http://da.wikipedia.org/wiki/Hausdorffrum} \end{document} 

When not using hyperref the result comes out as expected. Adding hyperref gives me something similar to

http://da.wikipedia.org/wiki/Åben_m\T1\aengde 

anyone have any idea how to fix this? There is nothing wrong with the URL.

4
  • 2
    Slightly off-topic perhaps there is something wrong with the url. According to the RFC for URL only a-zA-Z0-9 and some special characters $,-,_,.,+,!,*,',(,),"," where the "," represents a ,. Other characters can be encoded using % hex hex where hex follows 0-9[A-F|a-f]. Apparently this RFC is no longer used? Commented Oct 31, 2011 at 10:25
  • 1
    As far as I know, the use of national chars in URLs have been allowed for some time. Commented Oct 31, 2011 at 10:47
  • This example works out of box in XeLaTeX. Commented Oct 31, 2011 at 10:51
  • 1
    Use \href{http://da.wikipedia.org/wiki/%C3%85ben_m%C3%A6ngde}{http://da.wikipedia.org/wiki/Åben_mængde} instead. You have to encode the URL, for example using the W3 URL encoder. Commented Nov 10, 2011 at 15:49

1 Answer 1

4

One of your links works (pdftex, miktex 2.9) with this:

\href{http://da.wikipedia.org/wiki/\string Åben_m\string ængde}{http://da.wikipedia.org/wiki/Åben\string_mængde} 

But it is not very reliable. It fails (understandably) if I copy the code to an utf8 file. Also I don't know how much "intelligence" the pdf-reader has to invest to translate the link correctly in the whatever-it-is-called international notation. I think you should retry to get Heikos attention, probably he simply overlooked your question a c.t.t.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.