Skip to content

Does Universal Cloud REST API support Chinese characters via POST method #228

Closed Answered by ChrisCollinsIBM
JiaChee asked this question in General
Discussion options

You must be logged in to vote

We did find the source of the issue. In general Chinese or other UTF-8 characters aren't a problem. We have discovered however that if the HTTP response Content-type header doesn't contain a charset attribute, the default charset was using Consts.ISO_8859_1 which is not UTF-8.

Header with charset
Content-Type: application/json; charset=utf-8

Header without charset
Content-Type: application/json

The latter isn't wrong as the RFC for the application/json content-type doesn't require you to specify a charset if it's the default (which is UTF-8) - https://datatracker.ietf.org/doc/html/rfc4627

We'll be changing this to default to UTF-8 if no charset is specified in the next RPM release.

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by ChrisCollinsIBM
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rpm-issue Issue requires an updated Universal Cloud REST API RPM bug Confirmed Bug in-development Assigned and in development
2 participants