[XeTeX] bug for XeTeXdefaultencoding?

Jonathan Kew jonathan_kew at sil.org
Fri Mar 14 23:12:32 CET 2008


On 14 Mar 2008, at 7:02 am, SUN Wenchang wrote:

> Hi,
>
> I had trouble with \XeTeXdaultencoding. The following tex file can  
> not be compiled correctly:
>
> \XeTeXdefaultencoding "GBK"
> \documentclass{article}
> \usepackage{fontspec}
> \setmainfont{SimSun}
> \begin{document}
> \tableofcontents
> \section{中文}
> 中文
> \end{document}
>
> I find that the "output encoding" used in aux, toc, ... is always  
> UTF8, no mater which input encoding is used.

Yes, that's correct.

>
> As a result, to change the default encoding may get into troubles.

True. Changing the default encoding may be useful before loading a  
non-Unicode file, but you'll need to change it back before reading  
any file that xetex itself has generated, such as the .toc or .aux file.

In general, I would strongly recommend using Unicode (UTF-8) for your  
input text, if at all possible.

JK

>
>
> PS: Changing the default encoding is useful with Windows + WinEdt.
>
> Wenchang
>
> 用部落格分享照片、影音、趣味小工具和最愛清 
> 單,盡情秀出你自己 — Windows Live Spaces
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20080314/f092371a/attachment.html 


More information about the XeTeX mailing list