0

I have a problem that seems to be quite common. When I compile my document I get several unicode errors, In my case I get errors on the characters \global (U+2D1) and \egroup(U+2F2). By dumb luck I found the two offending symbols in my bibliography as part of an author name.

Mart{\a'\i}nez

These problems come up a lot and are very tricky to solve as the problem can be more or less anything. I have looked at several other questions with the same problem. here, here, here. Generally, the suggested solution is to do a variant on \DeclareUnicodeCharacter{<Unicode Hex>}{!!!!I-AM-HERE!!!!!}

If I type \DeclareUnicodeCharacter{U+2D1}{!!!!I-AM-HERE!!!!!} I get the following errors "Missing number treated as a zero" and "Missing \begin{document}". However, if I use the following code \DeclareUnicodeCharacter{2D1}{!!!!I-AM-HERE!!!!!} It changes nothing and "!!!!I-AM-HERE!!!!!" doesn't appear anywhere in the document. I am using PDFLatex to generate the document.

  • Why is the code snippet not working in my document?
  • What strategies can I use to deal with the Unicode errors produced by autogenerated .bib bibliographies?
  • You should (almost always) provide a small test file that shows the problem. Are you using biblatex+biber or bibtex to process the bib file? In the snippets you have shown so far there is only ascii text so inputenc is not involved at all. – David Carlisle Jun 3 at 10:16
1

\DeclareUnicodeCharacter{U+2D1}{!!!!I-AM-HERE!!!!!}

should be

\DeclareUnicodeCharacter{02D1}{!!!!I-AM-HERE!!!!!} 

But the character U+02D1 is MODIFIER LETTER HALF TRIANGULAR COLON which it seems is unlikely to be in your source.

You show the unicode numbers prefixed by spurious tex commands (\global, \egroup) which rather suggests that the entire error message is spurious and caused by an encoding error perhaps earlier in the file.

With no example provided, hard to suggest any fix.

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.