2

I'd like to use an lco file for my personal information. Unfortunately there are several german characters (ß, ä, ...) contained in that file, which aren't displayed correctly in the final pdf. Using \RequirePackage or \usepackage didn't solve my problem. Either did \RequirePackage[latin1]{inputenc}. Does someone has any advice?

Regards Andi

4
  • 4
    Welcome to TeX SX! Try using \usepackage[utf8]{inputenc} and \usepackage[T1]{fontenc}. Most modern editors use utf8.
    – Bernard
    May 12, 2018 at 20:53
  • Thanks for your help @Bernard. Unfortunately I still didn't manage to accomplish what I wanted to do. I'm pretty sure I tried every combiniation where to put those commands (in the .lco and .tex, also with \ReqirePackage) but if the text from one file works the other doesn't. :(
    – AndiLeni
    May 12, 2018 at 21:13
  • 2
    Another possibility would be to first convert you file to utf8. An editor like TeXmaker can do that and usually can detect correctly the real encoding of the file.
    – Bernard
    May 12, 2018 at 21:21
  • This is the solution! The problem was that the two files were encoded differently. Thank you again!
    – AndiLeni
    May 12, 2018 at 21:27

1 Answer 1

3

I have no problem if every file is UTF-8 encoded.

\begin{filecontents*}{andileni.lco}
\ProvidesFile{andileni.lco}
\setkomavar{fromname}{Andi Leni}
\setkomavar{signature}{Andi Leni}
\setkomavar{fromaddress}{Müllerstraße\\Würzburg}
\end{filecontents*}

\documentclass[
  foldmarks=true,
  foldmarks=blmtP,
  andileni,
  version=last
]{scrlttr2}
\usepackage[utf8]{inputenc}

\begin{document}
\begin{letter}{Üöäß\\Berlin}
\opening{Dear Üöäß,}

you have a very strange name.

\closing{Best wishes}
\end{letter}

\end{document}

The filecontents* environment is only used for making the example selfcontained.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .