chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller (JIRA) <>
Subject [jira] [Commented] (CMIS-377) Characters encoding issue when using Atom binding
Date Fri, 20 May 2011 13:22:47 GMT


Florian Müller commented on CMIS-377:

I don't understand the problem. The Atom binding always returns UTF-8, regardless of the encoding
of the request. I can't find any hint in the AtomPub spec that defines that the encoding of
the request and the encoding of the response must be the same. I think nowadays all XML parsers
can handle UTF-8 just fine.

> Characters encoding issue when using Atom binding
> -------------------------------------------------
>                 Key: CMIS-377
>                 URL:
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-server
>    Affects Versions: OpenCMIS 0.3.0
>            Reporter: Cedric Moitrier
> Atom binding does not properly handle characters encoding in HTTP responses.
> Actually, the XMLOutputStream is created using the following piece of code:
> <pre>
> XMLOutputFactory factory = XMLOutputFactory.newInstance();
> fWriter = factory.createXMLStreamWriter(out);
> fWriter.writeStartDocument();
> </pre>
> which is located in org.apache.chemistry.opencmis.server.impl.atompub.XMLDocumentBase#startDocument(OutputStream).
> In order for the encoding in the XML header to match the actual characters encoding,
this should be replaced by:
> <pre>
> XMLOutputFactory factory = XMLOutputFactory.newInstance();
> fWriter = factory.createXMLStreamWriter(out, encoding);
> fWriter.writeStartDocument(encoding, "1.0");
> </pre>
> The output encoding can be obtain from the HTTP request.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message