Using: Win 10, MikTex 2.9.6210, TeXnicCenter 2.02. Compiling with TeXnicCenter's default profile LaTeX => PDF, which uses pdflatex.exe
I seem to have ran into a pickle. I have two files:
- _Main.tex -> created by editing a template file I downloaded from my faculty's website.
- TestingCRLF.tex -> created with RightClick > New > Text Document and then edited.
They both contain the code:
\documentclass[11pt,openright,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage[portuguese,english]{babel}
\title{Testing special characters.}
\author{The very Me}
\begin{document}
\maketitle
Testânto caractéres epecíais.
\end{document}
_Main.tex compiles withouth error but TestingCRLF.tex has 3 errors. One for each of the special characters within document
.
The errors I get are:
! Package inputenc Error: Unicode char ânt (U+E4)
(inputenc) not set up for use with LaTeX.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...
l.10 Testânt
o caractéres especíais.
The other two errors mention characters (U+E0) and (U+D7).
In the past I've faced the issue of porting a tex file from linux, which uses only Line Feed ('\n') character for ending a line, while Windows used Carriage Return and Line Feed ("\r\n") to end a line. This caused this type of errors when compiling.
To check for that issue I used NotePad++ which allows you to see special hidden characters. I tell you, both files have "\r\n" at the end of each line. So I can only conclude both files are IDENTICAL. But one compiles and the other does not.
usepackage[utf8]{inputenc}
line, then yes. They are the same. I copy and pasted with Ctrl+A selection from one file to the other, within TeXnicCenter.\usepackage[utf8]{inputenc}
you are not setting the encoding, you only inform latex about the file encoding. When you are not saying the truth, you get errors.