2

I am writing a scientific document using natbib for the bibliography. The .tex file and .bib file are UTF-8 encoded and I have \usepackage[utf8]{inputenc} in the preamble.

One of my references has an author named "Åke" and I get the error "! Package inputenc Error: Unicode char �. (U+31) (inputenc) not set up for use with LaTeX." caused by the letter Å. I can get rid of the error by e.g. manually replacing Å by \AA in the .bib file.

What I do not understand is the code point shown in the error message. Normally I would solve the problem by putting a \DeclareUnicodeCharacter{codepoint}{definition} in the preamble of the document.

But the codepoint 31 belongs to the symbol 1 (and an error message tells me that I am not allowed to change its meaning via \DeclareUnicodeCharacter). The actual codepoint of the letter Å is 00C5, but when I try \DeclareUnicodeCharacter{00C5}{\AA}, the error does not disappear.

Does anyone of you have a possible explanation of this behavior?

Sebastiano
  • 54,118
LLang
  • 121
  • 2
    Is Åke a first name? Then bibtex is probably trying to create an initial and breaks the utf8 in parts. – Ulrike Fischer Sep 18 '19 at 14:41
  • 2
    bibtex works only by chance with non-ASCII encoding. You should consider moving to biber/biblatex... see for example: https://tex.stackexchange.com/questions/238725/utf8-and-bibtex-problems https://tex.stackexchange.com/questions/243836/bibliography-bib-encoding-utf8-french-accents and all the linked posts... – Rmano Sep 18 '19 at 14:43
  • 1
    @daleif IIRC bibtex8 is meant for 8bit encodings like ISO-8859-1 as oppsed to 7bit ASCII. UTF-8 is a different matter still. – Ralf Stubner Sep 19 '19 at 09:05
  • @RalfStubner by bad then – daleif Sep 19 '19 at 09:42

0 Answers0