[OS X TeX] TeXShop 2.14 does not display saved Chinese characters correctly

Herbert Schulz herbs at wideopenwest.com
Wed Dec 5 17:06:29 EST 2007

On Dec 5, 2007, at 3:27 PM, Maarten Sneep wrote:

> On 5 dec 2007, at 22:00, Jung-Tsung Shen wrote:
>> I am using TeXShop (2.14) on OS 10.4.11.
>> The document containing Chinese characters can be compiled and  
>> displayed correctly using CJK package now (see previous thread).  
>> However, when the file is saved, and reopened, the characters  
>> become random codes (or, codes), rather than the original typed  
>> characters. This is true regardless which method (UTF-8,  
>> Chinese ...) is used to save.
>> The previous version of TeXShop seems to not have this problem. I  
>> remember I tested this before following the discussions on this  
>> forum using xeLaTeX, and the saved documents containing Chinese  
>> characters show up fine when reopened.
>> I suspect this is also true for other language such as Japanese or  
>> Korean, but I haven't tested.
> I get the same.
> - setting the default encoding to UTF-8 does not help.
> - including the %!TEX encoding =  UTF-8 statement does not make a  
> difference.
> - Opening the file from the file menu and explicitly selecting UTF-8  
> for its encoding does not help.
> - The file displays correctly in BBEdit, and is recognised there are  
> UTF-8.
> I believe we have a bug in TeXShop.
> What I see is that non-ASCII characters are displayed as multiple  
> characters, from the 128-255 value range in whatever encoding  
> TeXShop finally decides to use.
> I'm on Leopard, so the OS did not introduce this change, afaics.  
> Richard, under which OS was 2.14 built?
> I'll file a bug report.
> Maarten


I've run into some similar things. Once the file is compromised there  
is a problem getting it back.

Try to make a fresh file starting with a blank document and make sure  
it has the

%%!TEX encoding = UTF-8 Unicode

line before saving it the first time. I've seen problems if I try to  
change the encoding once it has been saved.

I once took a file, did a Select All... and Copy and the opened a New  
document, Pasted and Saved (make sure you have the line above) and it  
worked ok.

I think Dick Koch knows about some this.

Good Luck,

Herb Schulz
(herbs at wideopenwest.com)

More information about the MacOSX-TeX mailing list