[jdom-interest] Special characters at the beginning of XML file.

John johnkie at pacbell.net
Wed Apr 16 18:51:38 PDT 2003


I would bet that is the unicode prefix Windows uses, either FF FE or FE FF.  
You sould be able to save the file with notepad and tell it not to save as 
UNICODE.  

JDOM should handle this, its fairly common.

John Kienitz

On Wednesday 16 April 2003 04:38 pm, David Parker wrote:
> I have seen this error twice now.
> I think that they are introduced by MS Notepad.
> I had an xml editor plug-in for Eclipse that allowed me to see them and
> delete them.
> I have re-installed Eclipse, lost the plug-in and can not clean the file.
>
> I am able to see ??<?xml version="1.0" encoding="UTF-8" standalone="no"?>
> in the console window with the echoUtf8Input() method.
> See attached MC.xml and method below.
>
> I have looked at the file with XMLSPY version 5 release 3
> and it thinks that it is well-formed and valid.
>
> Clearly it ignores the leading characters.
> But I get an org.jdom.JDOMException if I attempt to create a jdom document:
>
> this.doc = builder.build(this.input);
>
> There is something strange about these chars in the Windows environment.
> If I attempt to copy the text ( System.out.println(buffer.toString()); )
> from the console window, the only thing I am able to paste is:
> ??<
>
> This is a bug in jdom and needs to caught and handled "better".
>
> If you are able to see the garbage leading chars please let me know how and
> which viewer or editor you are using.
>
> Thank you.
>
> David Parker <dlparker at facstaff.wisc.edu>
>




More information about the jdom-interest mailing list