How can I compile LaTeX to UTF8?

I made my document in the ISO standard. It does not support umlaut alphabets such as ä and ö. I need them. The document compiles without UTF8, but not with UTF8. More precisely, the document does not compile with the line at the beginning of my main.tex:

\usepackage[utf8]{inputenc} 

How can I compile my LaTeX document in UTF8?

+60
utf-8 latex
Aug 10 '09 at 3:27
source share
7 answers

I'm not sure I am having your problem, but maybe this will help if you save the source using UTF-8 encoding.

I also use \usepackage[utf8]{inputenc} in my LaTeX sources, and by saving files as UTF-8 files, everything works just peachy.

+76
Aug 10 '09 at 3:42
source share

Save the file in UTF8 format.

Check the file format using the following command (UNIX):

 file -bi filename.tex 

You should see:

 text/x-tex; charset=utf-8 

Convert the file with iconv if it is not UTF8:

 iconv --from-code=ISO-8859-1 --to-code=UTF-8 filename.txt > filename-utf.txt 
+16
Aug 10 '09 at 3:38
source share

\usepackage[utf8]{inputenc} will not work for bibliographic records, such as:

 @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}} 

Use \usepackage[utf8x]{inputenc} for this entry

+10
Nov 19 '10 at 17:59
source share

Convert the document to utf8. LaTeX just reads your text as it is. If you want to use utf8 input encoding, your document must be encoded in utf8. This can usually be specified by the editor. There is also an iconv program that is useful for converting files from iso encodings to utf.

In the end, you will have to use an editor capable of supporting utf. (I have no idea about the utf support status on Windows, but any reasonable linux editor should be fine).

+5
Aug 12 '09 at 16:12
source share

I am using the LEd editor with the special "Filter" function. It replaces \ "{o} with ö and vice versa in its own editor, saving the original \" {o} in tex files. This makes the text easy to read when viewed in the LEd editor, and there is no need for special packages. It also works with bibliography files.

+1
May 21 '11 at 9:46 a.m.
source share

I have success using the Chrome addlatex addon. This online editor has excellent compatibility with most latex files, but it does not have some customization options. www.sharelatex.com

+1
Oct. 16
source share

You need to indicate your source.

However, the T E X compiler called by latex does not really support variable length encodings; he needs large libraries that say some bytes go together. Xelatex supports Unicode and works much better.

0
Nov 19. 2018-10-18
source share



All Articles