[Tex/LaTex] url hyperref does not work with French accent characters

accentshyperrefurls

I am using pdflatex.

The following creates a live link the the first URL ("mousse" with no French accent). When I click on it in the PDF, I am brought to that page. The second URL (containing two acute French accents) looks right in the PDF but the link is dead.

When I use latex and dvipdfm, two live links are created but they do not bring me to the proper place.

How can I get live URLs in my PDF, when the URLs contain European accented characters?

\documentclass[11pt]{article}
\usepackage{url}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\begin{document}

This creates a live link in the PDF:

\url{http://www.larousse.fr/dictionnaires/francais-anglais/mousse/52833}

The following looks all right in the PDF but is a dead link:

\url{http://www.larousse.fr/dictionnaires/francais-anglais/écrémer/27576?q=écrémé}
\end{document}

Best Answer

The URL should be percent encoded:

\href{http://www.larousse.fr/dictionnaires/francais-anglais/%C3%A9cr%C3%A9mer/27576?q=%C3%A9cr%C3%A9m%C3%A9}{%
  \nolinkurl{http://www.larousse.fr/dictionnaires/francais-anglais/écrémer/27576?q=écrémé}}

Copying and pasting the URL from the location bar of the browser (firefox, ...) usually gets the percent encoded version of the URL.

Related Question