You are viewing a plain text version of this content. The canonical link for it is here.
Posted to p-dev@xerces.apache.org by "Jason E. Stewart" <ja...@openinformatics.com> on 2003/11/01 06:47:48 UTC
[bugzilla@apache.org] DO NOT REPLY [Bug 24317] New: - DOMWriter::writeToString ignores encoding
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=24317>.
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=24317
DOMWriter::writeToString ignores encoding
Summary: DOMWriter::writeToString ignores encoding
Product: Xerces-C++
Version: 2.3.0
Platform: Macintosh
URL: http://http://
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: Other
Component: DOM
AssignedTo: xerces-c-dev@xml.apache.org
ReportedBy: jason@openinformatics.com
using writeToSting() will automatically set the encoding of the document to
UTF-16 regardless of the encoding value set in the writer, or if writing a
DOMDocument, the encoding of the document.
Why is this?
Here is the code repsonsible
XMLCh* DOMWriterImpl::writeToString(const DOMNode &nodeToWrite)
{
MemBufFormatTarget destination(1023, fMemoryManager);
bool retVal;
// XMLCh is unicode, assume fEncoding as UTF-16
XMLCh* tempEncoding = fEncoding;
fEncoding = (XMLCh*) XMLUni::fgUTF16EncodingString;