Using \usepackage[utf8]{inputenc} in moderncv.cls [closed]

I am trying to compile a CV using moderncv.cls but have problems with the special danish characters æ,ø,å. Normally I add either \usepackage[utf8]{inputenc} or \usepackage[applemac]{inputenc} packages to my template but this is not really working.

The moderncv.cls file has the following part:

  \RequirePackage[T1]{fontenc}
\IfFileExists{lmodern.sty}%
{\RequirePackage{lmodern}}%
{}


Normally I would have \usepackage[utf8]{inputenc} before fontenc, but the \RequirePackage seem to mess this up. I use Texmaker and MacOS.

Does anyone know how I can add the package?

MWE:

\documentclass[11pt,a4paper,sans]{moderncv} % Font sizes: 10, 11, or 12; paper sizes: a4paper, letterpaper, a5paper, legalpaper, executivepaper or landscape; font families: sans or roman

\moderncvstyle{casual} % CV theme - options include: 'casual' (default), 'classic', 'oldstyle' and 'banking'
\moderncvcolor{blue} % CV color - options include: 'blue' (default), 'orange', 'green', 'red', 'purple', 'grey' and 'black'

\usepackage[scale=0.75]{geometry} % Reduce document margins
%\setlength{\hintscolumnwidth}{3cm} % Uncomment to change the width of the dates column
%\setlength{\makecvtitlenamewidth}{10cm} % For the 'classic' style, uncomment to adjust the width of the space allocated to your name

%----------------------------------------------------------------------------------------
%   NAME AND CONTACT INFORMATION SECTION
%----------------------------------------------------------------------------------------

% All information in this block is optional, comment out any lines you don't need
\title{Curriculum Vitae}
\mobile{+45 31444177}
\email{lonnieandersen82@gmail.com}
%\photo[70pt][0.4pt]{pictures/Lonnie} % The first bracket is the picture height, the second is the thickness of the frame around the picture (0pt for no frame)
%\quote{"A witty and playful quotation" - John Smith}

%----------------------------------------------------------------------------------------

\begin{document}

\makecvtitle % Print the CV title

%----------------------------------------------------------------------------------------
%   EDUCATION SECTION
%----------------------------------------------------------------------------------------

\section{Education}

\cventry{2009--2013}{Ph.D student}{DTU Wind Energy}{}{Currently finishing thesis}{}
\cventry{2003--2009}{Cand. Scient in Biomedical engineering}{DTU}{}{\textit{GPA -- 8.4}}{}

\end{document}

-

closed as too localized by Frank Mittelbach, lockstep, Thorsten, diabonas, egregJan 12 '13 at 20:34

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Welcome to TeX.sx! It should make no real differerence if fontenc is loaded before or after inputenc. Can you add a minimal working example (MWE)? –  egreg Jan 12 '13 at 14:14
Hi I have added MWE that runs as soon as I comment out the adress line. I have tried using \o and {\o} which sometmes does the trick but nothing works. The fontenc line is something I have added but it makes no difference. –  Lonnie Jan 12 '13 at 14:53
The inputenc line should reflect the actual encoding of the file, which depends on the setting of the editor. Just ensure it's UTF-8 and add \usepackage[utf8]{inputenc}. –  egreg Jan 12 '13 at 14:59

This has nothing to do with the encoding of the file. (Although your example should have \usepackage[utf8]{inputenc} in it.)

The \address macro in moderncv requires 2 arguments, and you are only providing one. It then tries to read the \mobile macro as the second argument and the error arises.

So you need:

\address{Gladsaxevej 78, st tv}{2860 Søborg}