# The Greek letters in my document are appearing as semicolons. Why?

Using a solution provided by @egreg, I am experiencing some strange output when using the code:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}
\usepackage{lmodern}

\begin{document}

This is in English, but we also have
\textgreek{μια φράση στα ελληνικά}

\end{document}


When I compile, the output I get has semicolons in the place of the Greek letters:

My log file:

Any thoughts?

• Welcome to TeX.SE! Oct 27 at 21:49
• Please, show also the contents of the log file. Oct 27 at 21:52
• I can’t duplicate your problem, but here is another solution that might work for you,. It also lets you leave out \textgreek. Oct 27 at 21:53
• What happens if you add % !TEX encoding = UTF-8 Unicode at the very beginning of the file, save and rerun LaTeX? Oct 27 at 21:56
• @egreg I'm a little confused...I can't just write TEX encoding=UTF-8 Unicode in my preamble, can I? Oct 27 at 22:02

For strange reasons, TeXShop by default saves files in ISO-Latin-9 encoding. Indeed, if I run the following file

% !TEX encoding = IsoLatin9

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[greek,english]{babel}
\usepackage{lmodern}

\begin{document}

This is in English, but we also have
\textgreek{μια φράση στα ελληνικά}

\end{document}


I get the semicolons.

Change the first line to

% !TEX encoding = UTF-8 Unicode


and the problem will disappear.

Also go to the preferences and change the default encoding:

The relevant drop-down menu is under “Encoding”. This will save all files in UTF-8.

• It’s an extremely poor choice for TexShop to save in a format other than the default that LaTeX expects, but even worse to lose data when it saves and not even warn the user about it. Oct 27 at 22:06
• @Davislor I fully agree. Oct 27 at 22:07