[Tex/LaTex] Weird text when copying from PDF

copy/pastefont-encodingsfonts

\documentclass[12pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage[swedish]{babel}
\usepackage{fullpage}

\begin{document}
    åäö
\end{document}

Making a PDF from this creates a document with the text "åäö". Copying that text (OSX 10.9) results in "aa ̈o ̈"

Best Answer

The default output encoding used by LaTeX is OT1 and fonts in this encoding don't have precomposed accented characters. Therefore ä is first transformed into \"a which becomes \accent "7F a. Thus in the PDF file we get a set of elementary instructions for superimposing the dieresis to the a.

Load also

\usepackage[T1]{fontenc}

so the fonts used will not suffer from this problem, because they cover the glyphs used in several European languages written with the Latin alphabet. Swedish is completely covered.

\documentclass[12pt, a4paper]{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[swedish]{babel}

\usepackage{fullpage}

\begin{document}

åäö

\end{document}