[Tex/LaTex] German Umlaut problem – packages fontenc/inputenc do not work properly for included documents

font-encodingsincludeinput-encodings

I have a project with (so far) 5 included files. Within the first and the last included file the Umlauts are properly displayed, in the other three files there are undefined symbols in the output.
Fot the title page everything is fine also, the umlaut ü is preperly transferred to ü in the pdf.

%%%%%%%%%\include{Kap1}) – I do not know how to include a minimal sample of an included document in a master document, so I addedb%%%%%%%%%\include{Kap1} to show you how i included, similarly to the other four files… perhaps this is hint enough?

The umplauts are not properly displayed in my output pdf as long as I don't use e. g. \"a which is of course possible put really time consuming while writing a document which should finally consist of 200 pages. And, however, in 2 of 5 files i do not need those \"…

Do I need to use the inputenc and fontenc command AGAIN in the included documents?

Thanks in advance for your answers! And sorry for the uncoloured code – i do not know how to colour it.
Lisa

\documentclass[12pt,oneside,a4paper]{scrreprt}

\usepackage[ngerman]{babel}%{hyphsubst}
\usepackage[ansinew]{inputenc}%[ansinew]für eurozeichen; [latin9][UTF8] entfernt helfen ebenfalls nicht 
\usepackage[T1]{fontenc} %für Umlautdarstellung
\usepackage{textcomp} %zur Behebung weiterer Umlautfehler, Extrasymbole

\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{setspace}% erlaubt Befehle: singlespacing, onehalfspacing und doublespacing
\onehalfspacing

%%********** ENDE PRÄAMBEL************

\begin{document}
\begin{titlepage}
 \begin{center}
{\Large Lisa Müller}
 \end{center}
\end{titlepage}
%%

%%%%%%%%%\include{Kap1} 

\end{document}

Best Answer

There are two points where you have the control over the file encoding:

  1. for example for pdflatex: \usepackage[utf8]{inputenc}
  2. for TeXnicCenter (and other editors): define with which encoding the TeX file has to be saved on the hard disk.

BTW: The encoding UTF-8 is in my opinion the best choice, then you can exchange files between different operating systems usually with no problems.

Both choices for the encoding has to be the same!

The following images shows the way you can check and change the encoding with TeXnicCenter:

enter image description here

In the bottom line of TeXnicCenter (see small red circle) you can see the encoding the file has at the moment you opened it.

If you want to change the encoding, click on "File" -- "Save as". Then you can change the encoding (see big red circle).