# [Tex/LaTex] How to disable percent-encoding in URLs

biberbiblatexhyperrefunicodeurls

I try to add a unicode URL into the bibliography and LaTeX automatically converts the cyrillyc letters into percent-encoding. I found that hyperref is responsible for this, but I found no way to disable it. It's OK to encode the link itself, but in document I don't need this, the reader wants to see letters instead of character codes. I really don't want to print this https://ru.wikipedia.org/wiki/SLAM_(%D0%BC%D0%B5%D1%82%D0%BE%D0%B4) on papaer, this gives no useful information to reader.

TeX:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T2A]{fontenc}
\usepackage[english, russian]{babel}

\usepackage{biblatex}

\begin{document}
Hello \cite{Wiki:SLAM}.
\printbibliography
\end{document}


1.bib:

@InCollection{Wiki:SLAM,
title     = {SLAM (метод)},
booktitle = {Википедия~"--- свободная энциклопедия},
organization = {Wikimedia Foundation, Inc.},
date      = {2016-05-23},
url       = {https://ru.wikipedia.org/wiki/SLAM_(метод)},
urldate   = {2017-02-22},
language  = {russian},
}


Result:

I want to have https://ru.wikipedia.org/wiki/SLAM_(метод) in the URL.

A current biber knows the option --nouri-encode and then you get this

which isn't a sensible output either.

With a unicode engine like lualatex or xelatex and such a document (and again with --nouri-encode)

\documentclass{article}
\usepackage[english, russian]{babel}

\usepackage{biblatex}
\usepackage{fontspec}
\setmainfont{Arial Unicode MS} %something with cyrillic
\setmonofont{Arial Unicode MS} %something with cyrillic
\begin{document}
Hello \cite{Wiki:SLAM}.
\printbibliography
\end{document}


Adding hyperref to the document will give the same output but the link will be wrong:

## Edit

As the comment made clear that pdflatex solution is needed some background info: As the following example demonstrates url.sty can't in a realiable way print non-ascii chars. Depending on the surrounding language (and also depending on packages like hyperref) you get all sorts of wrong output.

The only way to get a perfect output is to handcraft it. This means that if you want this from a bib-file you will have to put the print version of the url in some extra field and change the biblatex macros for the url to use them.

\documentclass[parskip=half-]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1, T2A]{fontenc}
\usepackage[english,russian]{babel}
\usepackage{url}

\begin{document}

\minisec{Russian / T2A-encoding}

normal text:
https://ru.wikipedia.org/wiki/SLAM\_(метод)

url: \url{https://ru.wikipedia.org/wiki/SLAM_(метод)} %wrong output

{%correct output, \babelhyphen{empty} for breakpoint, _ has been escaped to \_
\fontencoding{T1}\ttfamily
https://\babelhyphen{empty}ru.\babelhyphen{empty}wikipedia.\babelhyphen{empty}org/%
\babelhyphen{empty}wiki/\babelhyphen{empty}SLAM\_({\fontencoding{T2A}\selectfont метод})
}

\selectlanguage{english}
\minisec{English / T1-encoding}

normal text: % https://ru.wikipedia.org/wiki/SLAM\_(метод) %errors

url: \url{https://ru.wikipedia.org/wiki/SLAM_(метод)} %wrong output

{%correct output, \babelhyphen{empty} for breakpoint, _ has been escaped to \_
\fontencoding{T1}\ttfamily
https://\babelhyphen{empty}ru.\babelhyphen{empty}wikipedia.\babelhyphen{empty}org/%
\babelhyphen{empty}wiki/\babelhyphen{empty}SLAM\_({\fontencoding{T2A}\selectfont метод})
}
\end{document}