[XeTeX] Problem with XeTeXdefaultencoding

SUN Wenchang sunwch at hotmail.com
Mon Aug 4 15:57:18 CEST 2008


Many Thanks!
 
Wenchang> From: jonathan at jfkew.plus.com> To: xetex at tug.org> Date: Mon, 4 Aug 2008 14:34:54 +0100> Subject: Re: [XeTeX] Problem with XeTeXdefaultencoding> > On 4 Aug 2008, at 1:39 PM, SUN Wenchang wrote:> > >> >> > Dear All,> >> > For some reasons, I need to change the default inputencoding. After > > the default encoding is changed back to utf-8,> > it can not ignore the UTF-8 leading bytes BOM in a subsequent call > > to \input{file}.> >> > Attached is an example.> > Note that main-a.tex is a copy of main.tex except removing the line> > \XeTeXdefaultencoding 'UTF-8'> >> > Use \XeTeXdefaultencoding "auto" to restore the default behavior.> > XeTeX only "sniffs" the first bytes of the file to determine the > encoding (and skips an initial BOM, if found) when it is using the > default "auto" encoding mode. If you explicitly set an encoding -- > including UTF-8 or a UTF-16 form -- it will simply read the entire > file using that encoding.> > If you want to explicitly set the enc!
 oding to UTF-8, yet still ignore > the BOM, you could do this with \catcode"FEFF=9. Or if you think it > might occur (functioning as ZWNBSP) elsewhere in the text, something > like> > \catcode"FEFF=\active \def^^^^feff{\ifhmode\kern0pt\fi}> > might be useful.> > JK> > > _______________________________________________> XeTeX mailing list> postmaster at tug.org> http://tug.org/mailman/listinfo/xetex
_________________________________________________________________
聰明搜尋和瀏覽網路的免費工具列 — MSN 搜尋工具列 
http://toolbar.live.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/xetex/attachments/20080804/1c3f5d2c/attachment.html 


More information about the XeTeX mailing list