xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Commented: (XMLBEANS-10) XmlTokenSource.save() does not use specified character encoding
Date Thu, 04 Mar 2004 17:18:31 GMT
The following comment has been added to this issue:

     Author: Michael Gris
    Created: Thu, 4 Mar 2004 9:16 AM
       Body:
Ok, that makes sense, and I've no further issues for this bug except to mention that the apidoc
should mention this behaviour. Recommend to close.
---------------------------------------------------------------------
View this comment:
  http://nagoya.apache.org/jira/secure/ViewIssue.jspa?key=XMLBEANS-10&page=comments#action_20966

---------------------------------------------------------------------
View the issue:
  http://nagoya.apache.org/jira/secure/ViewIssue.jspa?key=XMLBEANS-10

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XMLBEANS-10
    Summary: XmlTokenSource.save() does not use specified character encoding
       Type: Bug

     Status: Open

    Project: XMLBeans
 Components: 
             Binding
   Versions:
             unspecified

   Assignee: xmlbeans-dev@xml.apache.org
   Reporter: Michael Gris

    Created: Thu, 15 Jan 2004 1:18 AM
    Updated: Thu, 4 Mar 2004 9:16 AM
Environment: Operating System: All
Platform: PC

Description:
Saving the in-memory XML via the .save(Writer w, XmlOptions options) method 
inherited from XmlTokenSource does not honour the specified character encoding.

Example:

{
    // ... code above

        // GENERATE THE RESPONSE OBJECT.
        XLSType responseXLS = processXLSDocument(requestXLS, 
globalRequestContext);

        // SERIALIZE THE RESPONSE OBJECT.
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        OutputStreamWriter osw = new OutputStreamWriter(bos, "ISO-8859-1");

        // Serialize the response.
        xlsDoc = XLSDocument.Factory.newInstance();
        xlsDoc.setXLS(responseXLS);

        opts = new XmlOptions();
        opts.setCharacterEncoding("ISO-8859-1");
        opts.setUseDefaultNamespace();
        opts.setSaveAggresiveNamespaces();

        xlsDoc.save(osw, opts);
        osw.flush();
        osw.close();

    // ... code below


Always produces a document that is encoded in UTF-8 (xml header <?xml 
version="1.0" encoding="UTF-8"?>).

Incidentally, I haven't been able to find the list of character encodings that 
is supported by XMLBeans.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message