I use TexShop on my computer and everything works well. But TexLive 2023 gives a fatal error: Invalid UTF-8 byte "AO
What do I have to do?
I use TexShop on my computer and everything works well. But TexLive 2023 gives a fatal error: Invalid UTF-8 byte "AO
What do I have to do?
Your file might be saved in an encoding other than UTF-8. (This might be called Code Page 1252, Windows-1252, Latin-1, Western European, ISO-8849-1, ANSI, or many other things.) In many 8-bit encodings from the ’90s, "A0 is a non-breaking space. The fact that this seems to depend on which editor you save the file with probably means it’s misconfigured to save in the wrong encoding. All new documents should use UTF-8, which has been the default encoding for LaTeX since 2018.
The best solution is to configure your editor to save as UTF-8. If you really, truly need to load your source in some program from the last century that doesn’t understand UTF-8, add the following (and comment out any line that loads inputenc):
\usepackage{selinput}
\SelectInputMappings{
adieresis={ä},
germandbls={ß},
Euro={€},
}
That should work with PDFLaTeX, regardless of which encoding you saved in.