You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The client-side JSON endpoint (/51dpipeline/json) sends application/json written through the response's writer in the response's character encoding (ClientsidePropertyServiceCore.java line 281 at 30e48867). The servlet API makes that ISO-8859-1 when the application sets none, so a value with a character outside Latin-1, such as a city name, reaches the browser as bytes that are not UTF-8.
RFC 8259 section 8.1 says "JSON text exchanged between systems that are not part of a closed ecosystem MUST be encoded using UTF-8", and section 11 defines no charset parameter.
Write the JSON's UTF-8 bytes through the output stream with Content-Length counted in those bytes, and leave Content-Type as application/json, as the specification's table gives it. The JavaScript endpoint is written the same way, so decide its encoding in the same change, and whether its Content-Type should name the charset.
Test with a value outside Latin-1 and no encoding set by the application, red first.
Activity