[OS X TeX] SVG to LaTeX?

Anthony Morton amorton at fastmail.fm
Thu Jun 29 00:50:24 CEST 2006


>>        ! Text line contains an invalid character.
>>        l.266 ^^fe^^ff^^@<^^@
>>                             ?^^@x^^@m^^@l^^@
>>        ^^@v^^@e^^@r^^@s^^@i^^@o^^@n^^@=^^@"^^...
>>
>>        ? ^^@v^^@e^^@r^^@s^^@i^^@o^^@n^^@=^^@"^^...
>>
>> What is going on?

> I see two options here:
> 1) the svg file is encoded in UTF-16. Opening the file is a text 
> editor (TextWrangler, SubEthaEdit) will allow you to determine this.
> 2) The file includes some binary material.
> I guess it is #1, feff seems like a byte order mark for UTF-16, but I 
> may be mistaken.

It's in UTF-16.  '^^@' is a zero byte, and when you drop these and the 
initial byte order mark, you get

<?xml version="....

the initial part of the XML header for a SVG text file.

The solution is to load the file into a text editor and resave it as 
UTF-8, or to get the original application that wrote out the file to 
use UTF-8 in place of UTF-16.

Tony M.

------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the macostex-archives mailing list