# How to write properly an accent in a web address?

I'm trying to write a hyperlink for a DjVu document that includes Latin accent, but for some reason, it only displays properly for the PDF one. Specifically, on my list of references (bibliography), I have

\hyperref{http://www.something.com/camión/ }{link}.


It does not work: neither by replacing the letter ó by its Unicode \unichar{243} nor by its mathematical accent \acute{o}... Furthermore "copy-paste" of the glyph (ó) in the LaTEX word processor produces almost the same result, i.e., the above hyperlink in

1. PDF document, leads to the website

http://wwwu.something.com/camión/

2. DJVU document, leads to the website

http://www.something.com/cami"strange symbol"n/


Please, can you suggest me a way of solving this problem?

-
Welcome to TeX.SX! Please add a fully compilable minimal working example (MWE) that illustrates your problem. –  canaaerus Aug 1 '12 at 4:40
Sorry for bothering; just to remember you that although you have commented that my answer solved your problem (and you have thanked me, which I really appreciate), you still haven't accepted the answer; this can be done by clicking on the green checkmark below the vote count (more details here: How do you accept an answer?.) –  Gonzalo Medina Aug 5 '12 at 23:45
Since you have some responses below that seem to answer your question, please consider marking one of them as ‘Accepted’ by clicking on the tickmark below their vote count (see How do you accept an answer?). This shows which answer helped you most, and it assigns reputation points to the author of the answer (and to you!). –  lockstep Sep 2 '12 at 18:11

You can use the UTF-8 (hex.) representation:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}

\begin{document}

\end{document}


A site with a table to look up characters: http://www.utf8-chartable.de/

As Heiko Oberdiek mentions in his comment, the browser might help to get the correct encoded URL: you can copy&paste from the address bar or use the "Copy Link Address" facility.

-
The browser might help to get the correct encoded URL: Copy&page from the address bar or 'copy link location'. –  Heiko Oberdiek Aug 1 '12 at 2:08
@HeikoOberdiek Thank you. I've added these options to my answer. –  Gonzalo Medina Aug 1 '12 at 2:47

Here is an easy way to have the esoteric url encoding with Python 3.

import urllib.parse

print(
urllib.parse.quote(
"http://www.something.com/camión/",
safe = "/:"
).replace('%','\%')
)


This will give you.

http://www.something.com/cami\%C3\%B3n/

-
Gonzalo Medina: It happens, that it works well for both situations, in PDF and DjVu viewers. –  paritto6 Aug 1 '12 at 14:53