# Text encoding driving me crazy

I am writing a paper in english but will need to provide a danish abstract and use the little word "Köppen" as well. For some reason I seam not to be able to get the them to work. This example:

\documentclass{article}
\usepackage[german, danish, english]{babel} % danish and english languages
\usepackage{float}  % provides the ploat placement parameter H
\usepackage[ansinew]{inputenc} % provides the characters Æ, Ø, Å, æ, ø, å

\begin{document}
ö ø %å
\end{document}


compiles but gives me Ã¶ and Ã rather than ö and ø as they should as long is the file is saved in utf-8. If I save it in ISO Latin 9 the world is hole again and I get what I was wishing for.

The problem is that all my files are saved in utf-8 and I would like to not go through the process of changing them all.

Is there a setup to write documents containing ä, ö, ü, å, ø and æ using utf-8 encoding? I tried to play with these packages but di not get anywhere really.

\usepackage[german, danish, english]{babel} % danish and english languages
\usepackage[ansinew]{inputenc}
\usepackage[T1]{fontenc}


I know this should be easy to figure out but I have a deadline in 10 days and this just drives me up the wall. There are still bigger fish to fry and i only need a hand full of these little obnoxious ö's and co. Please help me keep my sanity (well, whats left of it anyways).

Side note: I love LaTeX for many reasons but the text encoding is driving my crazy. Why does it have to be so unnecessarily complicated? I mean I can type all these letters right here with no problem?!

-
why don't you change \usepackage[ansinew]{inputenc} to \usepackage[utf8]{inputenc}? – musicman May 19 '14 at 8:46
\usepackage[utf8]{inputenx} \usepackage[T1]{fontenc} – Sveinung May 19 '14 at 8:50
As others have said, tell LaTeX that you use utf8 if that's what you use. I just want to add that the maybe confusing "ansinew" is actually Windows-1252. An extension of Latin-1 by Microsoft that in the Microsoft world often is called "ansi" for historical reasons, even though it is not an ANSI standard. – pst May 19 '14 at 9:02
@musicman I ... Betriebsblind? Thanks! – MatoBehr May 19 '14 at 9:13
@pst Thats great info. Will this change have any other influence on the output? Is any formatting influenced by it? The "ansinew" came from a template that I am to use (from University) which had been encoded int Latin 9. I have saved it with utf8 encoding now and all works. Just concerned that there might be reasons why I should keep it at Latin 9 with ansinew. – MatoBehr May 19 '14 at 9:16

If the file is saved in UTF-8, then just use

\usepackage[utf8]{inputenc}


If you are saving the file in ISO Latin 9, then

\usepackage[latin9]{inputenc}


If you do not know the encoding of the file, then package selinput helps, e.g.:

\usepackage{selinput}
\SelectInputMappings{

The packages chooses the right encoding for inputenc depending on the given glyph mappings.
@MatoBehr: Yes, the encoding option for inputenc must match the encoding used in the TeX file. If the correct encoding is specified, then it does not matter much, which input encoding is used. – Heiko Oberdiek May 19 '14 at 9:26
+1 I'd missed selinput before. That seems a very sensible idea, thanks:-) – David Carlisle May 19 '14 at 9:29