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=24278>. 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=24278 Incorrect SAXException when serializing Œ with UTF-8 encoding ------- Additional Comments From [EMAIL PROTECTED] 2003-11-08 00:32 ------- Joe, since posting the patch I've thought of an alternate one and has about the same performance impact. The chunk of code could look like this: if (S_LINEFEED == c && useLineSep) { writer.write(m_lineSep, 0, m_lineSepLen); } else if (c <= M_MAXCHARACTER) { writer.write(c); } else if (isUTF16Surrogate(c)) { writeUTF16Surrogate(c, ch, i, end); i++; // two input characters processed } else { String encoding = getEncoding(); if (encoding == null) { writer.write(c); } else { String integralValue = Integer.toString(c); throw new SAXException(XMLMessages.createXMLMessage( XMLErrorResources.ER_ILLEGAL_CHARACTER, new Object[]{ integralValue, encoding})); } } Which would mean that you would only get an error only if you specified an encoding and the character was out of range. The code would work as before if no encoding was specified for "text" output. This is less risky than the patch that I submitted and it would also fix this bug.
