When compiling my code in Texmaker I get this error:
Error Package inputenc Error: Invalid UTF-8 byte "FC.
I don't know why. Can somebody help me?
\documentclass[11pt,a4paper,oneside,titlepage]{scrbook}
\usepackage[english,ngerman]{babel}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
\usepackage{siunitx}
\usepackage{esvect} % Für Vektoren
\sisetup{exponent-product = \cdot, output-product = \cdot, per-mode = fraction}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{tikz}
\newcommand*{\quelle}{%
\footnotesize Quelle:
}
\usepackage{microtype}% verbesserter Randausgleich
\usepackage{endnotes}
\usepackage[ super , square , sort&compress ] {natbib}
\bibliographystyle{unsrtdin}
\usepackage{hyperref}
\begin{document}
\begin{filecontents}{MeineBib.bib}
% Encoding: UTF-8
@Article{Wikipedia2021,
author = {Wikipedia},
journal = {https://de.wikipedia.org/wiki/Gleichwer ... note-D10-1},
title = {Gleichrichtwert},
year = {2021},
}
@Comment{jabref-meta: databaseType:bibtex;}
Der Gleichrichtwert wird wie folgt definiert: \cite{Wikipedia2021}
\end{filecontents}
\addsec{1) Zitieren}%
Dieser in der Elektrotechnik verwendete Begriff steht für den Mittelwert
des Betrages dieser Größe \cite{Wikipedia2021}
\bibliography{MeineBib}
\end{document}
filecontentsas used will not overwrite existing files, so if yourMeineBibcontains different content than shown here that could explain it.) You may also want to delete the.auxand.bblfiles and recompile. In any case errors like this are usually caused by wrong/not matching file encodings. With a modern LaTeX (April 2018 or newer) you should look into encoding all your files as UTF-8. (Your.bibfile claims to be UTF-8, so that would be good.) – moewe Apr 11 '21 at 06:58"FCand"F6: That are the positions ofüandöin Latin-1 (ISO 8859-1). That would strongly suggest one of the files is not actually saved as UTF-8, but as Latin-1. You have to find out which file that is and you have to make sure your editor (or whichever program writes it), uses UTF-8 from now on. – moewe Apr 11 '21 at 07:04inputencpackage throws an error; however, your same colde does not load theinputencpackage, making it pretty much impossible to follow what may be going on. Also, what is the sentence "Der Gleichrichtwert wird wie folgt definiert: \cite{Wikipedia2021}" doing inside the bib file? Please clarify. For instance, do please inform us whether your real document loads theinputencpackage and, if so, with which option, or options, it gets loaded. – Mico Apr 11 '21 at 07:27inputenc, so you can getinputencerrors without an explicit\usepackage[utf8]{inputenc}. That seems to be what is happening here: Noinputencis loaded, so modern LaTeX assumes UTF-8, but the document is probably in something like Latin-1. – moewe Apr 11 '21 at 07:31.bibfile. The problem is that your.texfile is not encoded as UTF-8, but instead as something else (quite probably Latin-1 [ISO 8859-1]). You have two options: (1) Convert your.texfile to UTF-8 or (2) tell LaTeX to assume Latin-1 encoding (and then recode the.bibfile). Since UTF-8 is the de facto standard file encoding nowadays I strongly recommend option (1). ... – moewe Apr 11 '21 at 07:34selinputpackage was created for this. It detects the file encoding automatically, so it will still work properly even if re-encoded. I also recommend using UTF-8. (In NFC form, as required by PDFTeX.) – Davislor Apr 11 '21 at 13:26