I am trying to send back XML strings with French accented characters.
I am confused as to what value I should be passing to the setEncoding
function.
I tried setting it to UTF-8. This does not seem to work.
When I look at the documentation below for setEncoding it states that:
        "Sets the encoding for this output method. Null means the default
encoding for the selected output method. For XML and HTML the default would
be "UTF-8". For other output methods, the default encoding is unspecified. "
I am confused by the statement:
        "For other output methods, the default encoding is unspecified. "

Should be passing in "iso-8859-1" to setEncoding?

setEncoding
public void setEncoding(java.lang.String encoding)
        Sets the encoding for this output method. Null means the default
encoding for the selected output method. For XML and HTML the default would
be "UTF-8". For other output methods, the default encoding is unspecified. 
Parameters: 
        encoding - The encoding, or null


PRB: XML Parser: Invalid Character Was Found in Text Content
 The information in this article applies to: Microsoft Internet Explorer
(Programming) version 5  
SYMPTOMS When parsing XML that contains "special characters" using the
Microsoft XML parser (MSXML), the parser may report the following error
message at the line and position of the first special character:  An Invalid
character was found in text content.  
CAUSE 
The XML document is not marked with the proper character encoding scheme.  
RESOLUTION 
Specify the proper encoding scheme in the XML processing instruction.  
- or -  
Re-encode the XML data as proper UTF-8.   


More Information
Most often, you will see this problem if you are working with data that uses
the simple "iso-8859-1" encoding scheme. In this case, the quickest solution
is usually the first listed prior in the RESOLUTION section. 
For example, use the following XML declaration:     
<?xml version="1.0" encoding="iso-8859-1" ?>
    <rootelement>    
       ...XML data...    
    </rootelement> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to