[texworks] Questions about encoding

Mojca Miklavec mojca.miklavec.lists at gmail.com
Fri Nov 6 16:56:54 CET 2009


On Fri, Nov 6, 2009 at 11:48, Ignasi Furió wrote:
> Hi all,
>
> I've been using WinEdt for years and now I'm starting to use TeXworks. With
> WinEdt I used ISO-8859-1 so when an old .tex file is openened with TeXworks
> all accented characters are wrong. I have two options, first one is two
> change TeXworks encoding, close and reopen TeXworks. Second one is insert
> "!TeX encoding=latin1" in all files, but this change must be done with the
> correct encoding in TeXworks (or with another editor) because the file will
> be saved with the selected encoding and I've no option to change it while
> saving the file.
>
> I've seen an issue about this question in TeXworks page so I would like to
> know how is people solving this problem.
>
> Should I work only with latin1 encoding and forget UTF8 because I mainly
> write in catalan and spanish? Should I tend to change to UTF8? Why?

Switch to UTF-8 and forget about latin1 instead. You'll be grateful
for that one day.

(I'm biased a bit. I also "only wrote Slovenian", but that meant a
different and incompatible encoding on each operating system. Latin2
on linux is different from "latin 2" (cp1250) on windows. Anything
else but Unicode was just causing me headaches all the time.)

One option to do that is to use
   recode latin1..UTF-8 yourfile.tex
from command line (for example with http://unxutils.sourceforge.net/).
I often use gvim to recode files (not for "beginners", but if you
want, I can send you the recipe), though TeXworks might be able to do
the recoding as well.

Mojca


More information about the texworks mailing list