xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Closed: (XMLBEANS-10) XmlTokenSource.save() does not use specified character encoding
Date Sat, 06 Mar 2004 05:54:31 GMT
Message:

   The following issue has been closed.

---------------------------------------------------------------------
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: Closed
 Resolution: WON'T FIX

    Project: XMLBeans
 Components: 
             Binding
   Versions:
             unspecified

   Assignee: 
   Reporter: Michael Gris

    Created: Thu, 15 Jan 2004 1:18 AM
    Updated: Fri, 5 Mar 2004 9:52 PM
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