[OS X TeX] text encoding corruption in TeXShop editor

Gianluca Gorni gorni at dimi.uniud.it
Wed Sep 13 14:12:45 CEST 2006


Hello!

I commonly have to work with TeX source files written by students on  
Windows
in Latin1 encoding. My problem is how to deal with them in TeXShop as  
easily
as possible. My TeXShop is set to MacOS encoding by default.

In BBEdit there is the menu item "reopen using encoding...". I  
couldn't find
an equivalent in TeXShop. The only way (that I know of) to display a  
file correctly
is to close it and then reopen it from the menu, selecting the  
encoding from
the open file panel.

For files that I have to open repeatedly over time I thought I had  
found a way:
in TeXShop I typed

%!TEX encoding = IsoLatin

at the top of the file. This way, I thought, next time I opened the file
by double-clicking, it would display correctly.

I was wrong. It seems that TeXShop had not simply added the new top  
line,
but it had changed the code of all the non-ascii characters. Now the  
file did not
display correctly in any editor and any encoding that I tried.
The compiled pdf also came out wrong.

In BBEdit, adding
%!TEX encoding = IsoLatin
does not corrupt the file, and display will be fine in TeXShop.

Best regards,
Gianluca Gorni

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list