[texworks] [XeTeX] Use of BOM in XeTeX and TeXworks

Stefan Löffler st.loeffler at gmail.com
Sun Jul 14 09:00:32 CEST 2019


On 13.07.19 22:39, Zdenek Wagner wrote:
> You are right but text editors do not recognize encoding comments and
> hence allow you to add UTF-8 characters to ISO 8859-1 files. BOM-aware
> editors will not allow to save such a mixed file hence you will not be
> able to damage the file by mistake.

I disagre. BOM are not mandatory in UTF8, so a file without one is not
automatically ISO 8859-1 (or any other non-UTF8 encoding). A text-editor
can (and nowadays in many cases probably will by default) choose to
interpret any file as UTF8 (unless explicitly told not to, e.g. by a
UTF16 BOM, the user, a magic comment, etc.). Thus, adding a BOM to UTF8
files will tell aware editors to interpret it as UTF8, but not adding a
BOM will not tell such editors not to interpret such files as UTF8.

Stefan


More information about the texworks mailing list