Issue 15550

Registry WS not returning UTF-8

Reporter: trobertson
Assignee: kbraak
Type: Bug
Summary: Registry WS not returning UTF-8
Priority: Blocker
Resolution: WontFix
Status: Resolved
Created: 2014-04-24 09:40:52.525
Updated: 2016-04-04 11:40:17.045
Resolved: 2014-04-24 14:08:08.154
Description: This might need investigating from IPT right through but from Dave Martin:
isnt returning UTF-8"

Assigning to [~kbraak] since it probably needs traced to the IPT itself to find the cause.  When we know it, we should consider sharing the information about how this happened, so we can watch for it again.]]>

Created: 2014-04-24 10:39:07.459
Updated: 2014-04-24 10:39:28.636
We do not return the encoding in a header, just the json content type: Content-Type:application/json
JSON defaults to UTF8, but allows for other unicode charsets too, so maybe should add the encoding to the content type header:
{{Content-type: application/json; charset=utf-8}}


3.  Encoding

   JSON text SHALL be encoded in Unicode.  The default encoding is UTF-8.

   Since the first two characters of a JSON text will always be ASCII
   characters [RFC0020], it is possible to determine whether an octet
   stream is UTF-8, UTF-16 (BE or LE), or UTF-32 (BE or LE) by looking
   at the pattern of nulls in the first four octets.

           00 00 00 xx  UTF-32BE
           00 xx 00 xx  UTF-16BE
           xx 00 00 00  UTF-32LE
           xx 00 xx 00  UTF-16LE
           xx xx xx xx  UTF-8


Comment: In the api call above I cannot find any bad character, can someone point out the exact problem?
Created: 2014-04-24 10:43:44.183
Updated: 2014-04-24 10:43:44.183

Created: 2014-04-24 11:14:17.671
Updated: 2014-04-24 11:14:17.671
The problem could be restricted to the display in browsers.

On first load in my browsers, the api call above displays with the wrong encoding. Selecting the right unicode encoding (from the browser), naturally fixes the bad characters.

Looking at one of those datasets (e.g., it displays fine in the portal:

Markus' suggestion to add the content-type header is needed to fix it. That being said, we honor the default JSON encoding, so it will be like stating the obvious.


Comment: Closing as Won't Fix.
Created: 2014-04-24 14:08:08.174
Updated: 2014-04-24 14:08:08.174