<br><font size=2 face="sans-serif">If you use wordpad and save as a text document (not unicode text) then you don't get the 3 bytes added. A quick look with HexEdit shows what is actually in the file.<br>
<br>
/Phill<br>
IS Dept, Software Engineer.<br>
phill_perryman@mitel.com<br>
http://www.mitel.com<br>
Tel: +44 1291 436023</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Laurent Bihanic <laurent.bihanic@atosorigin.com></b></font>
<br><font size=1 face="sans-serif">Sent by: jdom-interest-admin@jdom.org</font>
<p><font size=1 face="sans-serif">01/04/2004 08:45</font>
<br>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> To: "M.Novosselov" <novosselovm@3web.net></font>
<br><font size=1 face="sans-serif"> cc: jdom-interest@jdom.org</font>
<br><font size=1 face="sans-serif"> Subject: Re: [jdom-interest] jdom</font></table>
<br>
<br>
<br><font size=2 face="Courier New">Hi,<br>
<br>
M.Novosselov wrote:<br>
> I got a few surprises while testing my program. I wrote test XML file in <br>
> notepad and saved it using UTF-8 encoding. To my surprise I got a <br>
> parsing exception thrown by SAXBuilder:<br>
> root-element is missing. When I saved same file using other encodings - <br>
> everything worked fine (btw file with UTF-8 encoding had size 3 bytes <br>
> bigger than others).<br>
<br>
When requested to saved in Unicode format (UTF-8 or 16), Notepad adds a 2, 3 <br>
or 4-byte long "Byte Order Mark" (BOM) header to the file data (for more <br>
information: http://www.unicode.org/faq/utf_bom.html)<br>
Some parsers handle this header correctly (Xerces) some don't (Crimson).<br>
<br>
Laurent<br>
_______________________________________________<br>
To control your jdom-interest membership:<br>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com<br>
</font>
<br>
<br>