[Tex/LaTex] utf8 input encoding with biblatex (biber and bibencoding=utf8)

biblatexinput-encodings

I have a document with Cyrillic, English and German. All worked well so far. But now I need a special Character in the bibliography.bib file. Its an \.{E}

If I just put that in there it gives me the following error:

! Package inputenc Error: Unicode char \u8:Ė not set up for use with LaTeX.

Here's a sample code that reproduces that behavior:

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath,amsthm,amssymb,amsfonts}
\usepackage[T1,T2A]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[english,russian,ngerman]{babel}

\usepackage[backend=biber,bibencoding=utf8]{biblatex}

\usepackage{filecontents}
\begin{filecontents}{onebook.bib}
@book{eichenbaum,
author={{\.{E}}jchenbaum},
title={Wie Gogol's \enquote{Mantel} gemacht ist},
}
\end{filecontents}
\addbibresource{onebook.bib}
\nocite{*}

\begin{document}

\.{E}jchenbaum

Гоголь

Münze

\printbibliography

\end{document}

If I put a regular E in that .bib file, I get the following (and correct encoding as I want it outside the bibliography):

without special character in .bib

If I put that \.{E} in the .bib file and I comment out the line:
% \usepackage[utf8]{inputenc}
Then I get the following:

with special char in .bib file

So the funny thing is, I can get the bibliography interact with my document file at the cost of losing encoding of regular text in there …

As always, I appreciate any kind of help! Thanks!

Best Answer

I wrote the newunicodechar just for solving similar problems, due to the fact that the Unicode support of inputenc is limited (but extendable).

You can do in two ways:

  1. Look up in the Unicode table to find that Ė is U+0116 LATIN CAPITAL LETTER E WITH DOT ABOVE and add to your preamble

    \DeclareUnicodeCharacter{0116}{\.{E}}
    
  2. Copy the offending character from the terminal output or log file and paste it in the first argument of \newunicodechar:

    \newunicodechar{Ė}{\.{E}}
    

Both ways should solve your problem.