FFFE is the little endian rendition of the Byte Order Mark. Byter Order Marks are not generally valid in in-memory Unicode data, only in Unicode files. It's probably on byte 0 of the input array. Can you strip it out?
See this quotation from http://www.xencraft.com/resources/unicodebom.html : The BOM character The Unicode Character Standard designated two characters as an aid to distinguish big-endian data from little-endian data. "Endianness" is not a problem for UTF-8 since it is a serialized byte stream. However, to process data encoded in UTF-16 or UTF-32, an application must first determine if the data being read is in the same or different "endianness" from the architecture that the application runs on. Unicode designated the character U+FEFF as the "Byte Order Mark" (BOM) and reserved U+FFFE as an illegal character. If an application detects a U+FFFE it can therefore presume that the data is in the opposite endianness of the architecture and that the data should be byte swapped. (A 32-bit architecture should also be word swapped.) HTH! Matt -----Original Message----- From: Xiaofan Zhou [mailto:[EMAIL PROTECTED] Sent: Thursday, May 26, 2005 1:27 PM To: [email protected] Subject: Invalid character 0xFFFe Hi, All, I am encounting a XML parsing error saying something like the following: XML Parser failed, Error: Invalid character (Unicode 0xFFFe) The XML file size is about 100K in disk, the application is sort of like this: it is created from a DOM tree in memory then passed to a SAX parser. The error is reported in the SAX parser. Not sure where the unicode 0xFFFe come from, if I save the XML in file then load it into Internet Explorer, it is fine. Also, If I reduce the size, it also works fine. Any suggestions? Thanks much in advance. Frank ___________________________________________________________________ The information contained in this message and any attachment may be proprietary, confidential, and privileged or subject to the work product doctrine and thus protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by replying to this message and deleting it and all copies and backups thereof. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
