On Sat, May 06, 2017 at 04:56:17PM +1000, Stuart Prescott wrote:
> Hi Agustin,
> 
> > Saved file (attached as "test.tikz") contains an spurious leading <FEFF>
> > character.
> 
> The <FEFF> is the "byte order mark" which is an (optional) part of unicode 
> standards that tells the consumer of the data whether the multi-byte data is 
> little endian or big endian.
> 
> The BOM is supposed to be seemlessly handled by anything that is accepting 
> UTF-8 encoded data such as the files produced by qtikz; tools not handling 
> the 
> BOM are buggy so if the BOM is causing problems, please report bugs against 
> those tools. It sounds like joe and mc don't handle UTF-8 files correctly.

Hi,

Thanks for the info,

For historical reasons I mostly use latin1 in my LaTeX files. The problem
with this BOM char in included tikz files is that it is displayed as
garbage in the resulting output. And its not at all easy to notice where
that comes from. 

So, I have to thank joe for displaying it. I personally think that a plain
text editor should show whatever is in the text, so I do not consider this
a bug.

> If you'd rather not have the BOM, you can disable the addition of the BOM to 
> documents in the qtikz settings.
> 
>       Settings → Configure QtikZ → Editor → Encoding
> 
>               UTF-8 without BOM

Seems the way to go here.

When possible I try to create those tikz files (as well as bibtex databases)
using plain 7bit, using LaTeX comands for diacritics. This ensures portability.

> (I too dislike the BOM in what I think of as a 'plain text file' but I also 
> recognise that reliance on implicit encoding information is part of the 
> reason 
> why encodings are such a mess now and so I just move on since it does no 
> harm.)

For this purpose I would prefer a standard header being defined inside a
comment. Not sure if data consumers will look beyond first char.

Anyway, thanks a lot for letting me know that this was indeed intended and
how to disable it,

Best regards,

-- 
Agustin

Reply via email to