Are you certain that the encoding should be ISO-8856-9? I've never heard of that one. Maybe you mean ISO-8859-6 (Arabic) or ISO-8859-9 (Turkish)?
Let's assume that you meant ISO-8859-9. Then you just write
\usepackage[latin1]{inputenc}
in the beginning of your code,
\inputencoding{latin5}
just before you include the file and
\inputencoding{latin1}
to restore the original encoding.
EDIT:
UTF-8 might cause some problems. I'd solve it by stating that the whole document should be in UTF-8 and then switching back. Here's an example:
The following file is "main-file.tex", and should be saved with Latin 1.
\documentclass{article}
\usepackage[utf8]{inputenc}
\inputencoding{latin1}
\usepackage[russian,brazil]{babel}
\usepackage[T1]{fontenc}
\begin{document}
\section{First section}
Nunca vi socó coçar sem bico, nunca vi sem bico socó coçar. Um socó, dois socós, três socós, quatro socós, quantos socós pra um só socó coçar.
\inputencoding{utf8}
\selectlanguage{russian}
\input{external-file}
\inputencoding{latin1}
\selectlanguage{brazil}
\section{Third section}
A sábia não sabia que o sábio sabia que o sabiá sabia que o sábio não sabia que o sabiá não sabia que a sábia não sabia que o sabiá sabia assobiar.
\end{document}
Also create the file "external-file.tex", and save it with UTF-8:
\section{Second section}
Карл у Клары украл кораллы, а Клара у Карла украла кларнет.
This works for me without any warnings at all. Let me know the specific warnings and errors if you still can't get it to work.
it is a latin1 or latin9 encoding , same as ISO 8859-1 or 15. With command recode
or iconv
you can change it:
recode --diacritics --touch --verbose latin1..UTF-8 <file>
or
iconv -f LATIN1 -t UTF-8 inputfile.tex > outputfile.tex
Best Answer
I assume you are using
pdflatex
: bothxelatex
andlualatex
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 useinputenc
.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).