Listing Fehler: Package inputenc Error

Fragen und Probleme, die nicht den obigen Kategorien zugeordnet werden können


eld
Forum-Newbie
Forum-Newbie
Beiträge: 3
Registriert: Mo 10. Sep 2018, 16:24

Listing Fehler: Package inputenc Error

Beitrag von eld »

Moin moin,
ich habe ein Problem mit listing.

das möchte ich als listing darstellen:
@Component({
 selector: ‘app’,
 templateUrl: ‘app.component.html’
})
class AppComponent {
 public title = ‘Hello World’;
}
das ist meine tex datei:
\documentclass[
  a4paper,            % DIN A4
  DIV=10,             % Schriftgröße und Satzspiegel
  oneside,            % einseitiger Druck
  BCOR=5mm,           % Bindungskorrektur
  parskip=half,       % Halber Abstand zwischen Absätzen
  numbers=noenddot    % Kein Punkt hinter Kapitelnummern
]{scrreprt}
\usepackage{../style/thesisstyle}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{glossaries}
\usepackage{booktabs}

\lstset
{ %Formatting for code in appendix
%	language=Matlab,
	basicstyle=\footnotesize,
	numbers=left,
	stepnumber=1,
	showstringspaces=false,
	tabsize=1,
	breaklines=true,
	breakatwhitespace=false,
}

\makeglossaries           % create all glossary entries (remember: run makeglossaries manually)
\loadglsentries{thesisglossaries.tex}  % load acronym, symbol and glossarie entries

\begin{document}
\input{configuration/configuration}    % load all settings
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{5}

\hyphenation{Ba-che-lor-the-sis Mas-ter-the-sis}

\def\signed #1{{\leavevmode\unskip\nobreak\hfil\penalty50\hskip2em
		\hbox{}\nobreak\hfil(#1)%
		\parfillskip=0pt \finalhyphendemerits=0 \endgraf}}

\newsavebox\mybox
\newenvironment{aquote}[1]
{\savebox\mybox{#1}\begin{quote}}
	{\signed{\usebox\mybox}\end{quote}}

% Cover page here, no page number
\input{../style/coverpage}

% Titlepage is page one even if the number is not shown.
\pagenumbering{roman}
% Title page here
\input{../style/titlepage}

% Abstract page here
\input{../style/abstractpage}

% Table of contents here
\tableofcontents

% List of figures here
\IListOfFigures

% List of tables here
\IListOfTables

% List of accronyms here
\IListOfAccronyms

% List of symbols here
\IListOfSymbols

% Uncomment if list of source code is needed (rarely).
\lstlistoflistings  % requires package listings, needs to uncommenting of usepackage

% path to the chapters folder is set to find the images used there
\graphicspath{ {./chapters/} }

% Chapters
\clearpage
\pagenumbering{arabic}
\input{chapters/einleitung_chapter}
\input{chapters/grundlagen_chapter}
\input{chapters/anforderungsspezifikation_chapter}
\input{chapters/systementwurf_chapter}
\input{chapters/implementierung_chapter}
\input{chapters/test_chapter}
\input{chapters/schluss_chapter}
% Add additional chapters here

%\bibliographystyle{plain}
\bibliographystyle{dinat}
\bibliography{literature}

% Appendix
\appendix
\input{appendix/example_appendix}

\IGlossary

\Istatement

\end{document}
und so sieht mein Aufruf an der Stelle aus, an der ich das listing ahben möchte:
\lstinputlisting{./chapters/code/test.txt}
ich lese den Quellcode aus einer Datei.

nun bekomme ich allerdings den Fehler:
Package inputenc Error: Invalid UTF-8 byte sequence. selector: ‘app’,
Package inputenc Error: Invalid UTF-8 byte 152. selector: ‘app’,
Package inputenc Error: Invalid UTF-8 byte sequence. selector: ‘app’,
Package inputenc Error: Invalid UTF-8 byte sequence. templateUrl: ‘app.
usw.
Ich habe noch mal geguckt, die Text Datei ist uTF8 codiert.
Was mache ich falsch?

Benutzeravatar
u_fischer
Forum-Meister
Forum-Meister
Beiträge: 4266
Registriert: Do 22. Nov 2012, 11:09
Kontaktdaten:

Beitrag von u_fischer »

Nun, offensichtlich ist irgendwas doch nicht utf8 kodiert. Aber da du etwa zwanzig Dateien lädst, die wir nicht haben, und Kodierungen nach Copy&Paste nicht mehr sichtbar sind, wird das niemand für dich testen und korrigieren können.

Antworten