TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In order to avoid cluttering other related questions, I separately make this question.

If I use Notepad as my editor, there are 4 encoding options available when saving the TeX input file: ANSI, Unicode, Unicode big endian, and UTF-8.

I want to know which input encoding do I have to use for each file encoding mentioned above.

For example, when I choose Unicode as the file encoding, which input encoding do I have to choose?

share|improve this question
IIRC, Notepad means "UTF16" when saying Unicode. So if you want to use non-ASCII characters without escaping them, you should use UTF8 to save the file and use utf8 or utf8x as option to inputenc unless you use lualatex/xelatex as pointed out by Boris. Of course you should consider to use a proper editor or TeX IDE rather than Notepad. – Christian Apr 28 '12 at 14:56
Notepad++ is a nice candidate. It has a lot of handy features. – percusse Sep 24 '12 at 1:51
up vote 5 down vote accepted

I assume you are using pdflatex: both xelatex and lualatex understand Unicode.

If you have non-ascii characters, your best bet is UTF-8 file with \usepackage[utf8]{inputenc}. Otherwise choose ANSI and do not use inputenc.

However there is a catch: Windows Notepad always saves the BOM (byte-order mark), which LaTeX does not want to see in the input. So if you would like to use a Unicode input encoding, I would not use Windows Notepad (until it lets you specify "UTF-8 without BOM" as a save option).

share|improve this answer
Notepad++ can encode a document in UTF-8 without BOM. – pluton Aug 8 '13 at 14:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.