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 2006/08/11 00:03:42 UTC

DO NOT REPLY [Bug 24317] - DOMWriter::writeToString ignores encoding

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=24317


mail@iceberg.pl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




------- Additional Comments From mail@iceberg.pl  2006-08-10 22:03 -------
Maybe I am missing something, but writing string by DOMWriter::writeToString()
in UTF-16 and actually changing the encoding in the document and outputed XML
content are two separate, not necessarly connected things.
I use the code as below:

DOMDocument* doc;
(...)
doc->setEncoding(X("UTF-8"));
(...)
DOMWriter* writer;
(...)
char* XML = XMLString::transcode((writer->writeToString(*doc)));


And at the end I get an UTF-8 encoded string, that starts with:
<?xml version="1.0" encoding="UTF-16" standalone="no" ?>

Due to my humble interpretation, this is actually a bug.
I am using Xerces-C 2.7.0 (why can't I select 2.6.0 and 2.7.0 in the "version"
field above?).

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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