Lars Erbe created OLINGO-1138: --------------------------------- Summary: $format=json does not return default UTF-8 charset in response content type Key: OLINGO-1138 URL: https://issues.apache.org/jira/browse/OLINGO-1138 Project: Olingo Issue Type: Bug Components: odata4-server Affects Versions: (Java) V4 4.3.0 Reporter: Lars Erbe Priority: Minor Attachments: AssetGroupSet_correct_charset.json, AssetGroupSet_wrong_charset.json
Using the $format value "json" does not return the correct default charset as parameter in the response content-type header attribute. Attachment "AssetGroupSet_wrong_charset": using request URL with explicit charset in $format query parameter: ?$format=json Attachment "AssetGroupSet_correct_charset": using request URL with explicit charset in $format query parameter: ?$format=application/json;charset=UTF-8 Note the Norwegian characters in the "Name" property and the "GeoPosition/City" property to see the difference. Link to OData V4 JSON Format specification: http://docs.oasis-open.org/odata/odata-json-format/v4.0/os/odata-json-format-v4.0-os.html#_Toc372793046 "4.1 Header Content-Type ... Requests MAY add the charset parameter to the content type. Allowed values are UTF-8, UTF-16, and UTF-32. *If no charset parameter is present, UTF-8 MUST be assumed.*" I could workaround the problem by setting the charset=UTF-8 content-type header parameter before setting the header at the response object in the processor. -- This message was sent by Atlassian JIRA (v6.4.14#64029)