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?

  • 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
    Commented Apr 28, 2012 at 14:56
  • Notepad++ is a nice candidate. It has a lot of handy features.
    – percusse
    Commented Sep 24, 2012 at 1:51

1 Answer 1


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).

  • 1
    Notepad++ can encode a document in UTF-8 without BOM.
    – pluton
    Commented Aug 8, 2013 at 14:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .