6

I am trying to use bibtex to output the url from a reference, but it's not working because the url has accentuation, just like below:

url = {http://www.epe.gov.br/mercado/Documents/Série\%20Estudos\%20de\%20Energia/20130117_1.pdf},

The output is:

http://www.epe.gov.br/mercado/Documents/S\unhbox\voidb@x\ bgroup\let\unhbox\voidb@x\setbox\@tempboxa\hbox{e\global\ mathchardef\accent@spacefactor\spacefactor}\accent19e\ egroup\spacefactor\accent@spacefactorrie%20Estudos%20de% 20Energia/20130117_1.pdf

Is there a way to protect the accentuation when it enters on url environment?

migrated from stackoverflow.com Feb 8 '13 at 12:12

This question came from our site for professional and enthusiast programmers.

5

An URL should not contain accented characters (cf. Uniform resource locator or RFC 3986).

In your URL, replace accented characters by encoded characters:

http://www.epe.gov.br/mercado/Documents/S%C3%A9rie%20Estudos%20de%20Energia/20130117_1.pdf

Edit: Fast reference for encoded characters.

  • The problem with encoded characters is that they obscures the URL such that one can't know what it actually is without a browser. This might be a problem if the work will be printed and the reader is supposed to enter the URL by hand (and is expected to have the input method for the language). – Imperishable Night Dec 28 '17 at 18:31
  • @ImperishableNight Extract from RFC 3986: A URI is composed from a limited set of characters consisting of digits, letters, and a few graphic symbols. This set does not contain any accented character! – Paul Gaborit Dec 28 '17 at 23:53
  • Then RFC 3987 happened and defined the Internationalized Resource Identifier (IRI). You may argue that it's not "true" URL (the % escaped sequence is), but every modern browser accepts them, and they made my life browsing Chinese wikis a lot merrier. – Imperishable Night Dec 29 '17 at 10:29
  • @ImperishableNight Modern browsers can accept IRIs ... but PDF specifications only know URLs. – Paul Gaborit Dec 29 '17 at 23:26
  • Which, I guess, means that we want to show the IRI but jump to the URL when clicked on. I mean, the second part is optional, you can't click on a printed document anyway. – Imperishable Night Jan 3 '18 at 13:23
2

If I use \usepackage[]{hyperref} before \begin{document} and use in my bibliography e.g. url = {http://www.de.wikipedia.org/wiki/Beyoncé_Knowles}, then everything runs without problems. But it is difficult to say if the hyperref-package helps in your case because you do not tell us which packages you are using.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.