[Tex/LaTex] ! Package inputenc Error: Unicode char ́ (U+301)(inputenc)

bibtexerrorsinput-encodingsunicode

I get this error message, during compiling my .tex-document.

line 234 - ! Package inputenc Error: Unicode char ́ (U+301)(inputenc) not set up for use with LaTeX.See the inputenc package documentation for explanation.Type H <return> for immediate help.... \cleardoublepage

I am writing my thesis right now and I am very confused about this error message, since it seems to be connected to a special character, which I do not use in my manuscript. The solution up to now was the reloading of an older version of my manuscript…after some hours of work and after several times of successful compiling this error suddenly occurs again. I don't get it why, since I just write some text, add some figures and nothing more…

any suggestions, how I can solve that issue? I have no idea, what kind of MWE I should post here 🙁 where does this comment "line234" refer to. Line 234 is normal text in my manuscript…

Best Answer

If you copy/paste some source, it may happen that é had been coded as

U+0065 U+0301

which in Unicode aware environments is rendered as expected. Unfortunately pdflatex is not Unicode aware and cannot deal with combining characters, which are placed after the character they refer to.

The only method that gives correct results is to change the combination into the non composed character.

Doing \DeclareUnicodeCharacter{0301}{\'{e}} is wrong. Here's an example:

\documentclass{article}

\DeclareUnicodeCharacter{0301}{\'{e}}

\begin{document}

é % non composed character U+00E9
é % composed character U+0065 U+0301
ú % composed character U+0075 U+0301

\end{document}

enter image description here

You're removing the error message, but the output is completely off.

Note Copying from the above will not show the precomposed characters, because either my OS or this site does normalization.