You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2003/01/15 06:23:30 UTC

DO NOT REPLY [Bug 16091] New: - DOMWriter::writeNode() doesn't work for UTF-16

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16091>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16091

DOMWriter::writeNode() doesn't work for UTF-16

           Summary: DOMWriter::writeNode() doesn't work for UTF-16
           Product: Xerces-C++
           Version: Nightly build (please specify the date)
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: DOM
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: yifanl@profoundeffects.com


This problem is found in nightly build of 01/11/2003 (xerces-c_2003-01-11-
win32) and previous builds.
I have a xml file in UTF-16 encoding, in which each character is represented 
by 2 bytes. When I use the xerces-c_2003-01-11-win32\samples\DOMPrint program:
"DOMPrint -wenc=UTF-16 -wfile=OutputXMLFile.xml InputXMLFile.xml"
Or
"DOMPrint -wfile=OutputXMLFile.xml InputXMLFile.xml"
I got invalid OutputXMLFile.xml because there is no byte-order mark at the 
beginning of OutputXMLFile.xml. 

Note: 
1. byte-order mark is either 0xFFFE (for little-endian) or 0xFEFF (for big-
endian). byte-order mark is used by xml processor to know how to process the 
rest of the UTF-16/UCS-2 file. 
2. If the first two bytes of the xml file is not a byte-order mark, or the 
first four bytes of the xml file is not "<?xm", the xml file is looked as an 
invalid one and will not be processed by the xml processor.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org