-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#3165] fix(client-java): Fix the http client toJson
encode without UTF-8
#3179
Conversation
@jerryshao Could you please take a look of this? Thanks. |
toJson
encode without UTF-8
"这是中文comment", | ||
Fileset.Type.MANAGED, | ||
storageLocation, | ||
ImmutableMap.of("k1", "v1")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is not just a comment that is affected by this issue, but also like storageLocation, property key and value, right? Can you also add tests to cover this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add some assertions for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
… UTF-8 (#3179) ### What changes were proposed in this pull request? Currently in the java client, the json result is not encoded with `UTF-8` when requesting the server, which will cause some Chinese characters to be garbled.It will use `ISO_8859_1` as default. This PR fixed this. ![image](https://github.com/datastrato/gravitino/assets/26177232/9342dd32-1ded-4670-a3c7-37d9a5673955) ### Why are the changes needed? Fix: #3165 ### How was this patch tested? Add some ITs. --------- Co-authored-by: xiaojiebao <[email protected]>
…ithout UTF-8 (apache#3179) ### What changes were proposed in this pull request? Currently in the java client, the json result is not encoded with `UTF-8` when requesting the server, which will cause some Chinese characters to be garbled.It will use `ISO_8859_1` as default. This PR fixed this. ![image](https://github.com/datastrato/gravitino/assets/26177232/9342dd32-1ded-4670-a3c7-37d9a5673955) ### Why are the changes needed? Fix: apache#3165 ### How was this patch tested? Add some ITs. --------- Co-authored-by: xiaojiebao <[email protected]>
What changes were proposed in this pull request?
Currently in the java client, the json result is not encoded with
UTF-8
when requesting the server, which will cause some Chinese characters to be garbled.It will useISO_8859_1
as default. This PR fixed this.Why are the changes needed?
Fix: #3165
How was this patch tested?
Add some ITs.