How can I compile LaTeX in UTF8?
LatexUtf 8Latex Problem Overview
I did my document in an ISO-standard. It does not support umlaut alphabets, such as ä and ö. I need them. The document gets compiled without UTF8, but not with UTF8. More precisely, the document does not get compiled with the line at the beginning of my main.tex:
\usepackage[utf8]{inputenc}
How can I compile my LaTeX document in UTF8?
Latex Solutions
Solution 1 - Latex
I'm not sure whether I got your problem but maybe it helps if you store the source using a UTF-8 encoding.
I'm also using \usepackage[utf8]{inputenc}
in my LaTeX sources and by storing the files as UTF-8 files everything works just peachy.
Solution 2 - Latex
Save your file in UTF8 format.
Verify the file format using the following (UNIX) command:
file -bi filename.tex
You should see:
text/x-tex; charset=utf-8
Convert the file using iconv
if it is not UTF8:
iconv --from-code=ISO-8859-1 --to-code=UTF-8 filename.txt > filename-utf.txt
Solution 3 - Latex
\usepackage[utf8]{inputenc}
will not work for a bibliographic entry such as this:
@ARTICLE{Hardy2007,
author = {Ibn Taymiyyah, Aḥmad ibn ʿAbd al{-}Halīm},
title = {Naqḍ al{-}manṭiq},
shorttitle = {Naqḍ al-manṭiq},
editor = {Ḥamzah, Aḥmad},
publisher = {Maktabat a{l-}Sunnah},
address = {Cairo},
year = {1970},
sortname = {IbnTaymiyyaNaqdalmantiq},
keywords = { Logic, Medieval}}
For this entry use \usepackage[utf8x]{inputenc}
Solution 4 - Latex
Convert your document to utf8. LaTeX just reads your text as it is. If you want to use the utf8 input encoding, your document has to be encoded in utf8. This can usually be set by the editor. There is also the program iconv
that is useful for converting files from iso encodings to utf.
In the end, you'll have to use an editor that is capable of supporting utf. (I have no idea about the status of utf support on windows, but any reasonable editor on linux should be fine).
Solution 5 - Latex
You needed to iconv your source.
That said, the TEX-based compiler invoked by latex
doesn't really support variable-length encodings; it needs big libraries that tell it that certain bytes go together. Xelatex is Unicode-aware and works much better.
Solution 6 - Latex
I use LEd Editor with special "Filter" feature. It replaces "{o} with ö and vice versa in its own editor, while maintaining original "{o} in tex files. This makes text easily readable when viewed in LEd Editor and there is no need for special packages. It works with bibliography files too.
Solution 7 - Latex
I have success with using the Chrome addon "Sharelatex". This online editor has great compability with most latex files, but it somewhat lacks configuration possibilities. www.sharelatex.com