Skip to content
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

string encoding/decoding is imcompatible with dubbo-hessian-lite for four char > 0xFFFF #23

Closed
wbpcode opened this issue Dec 28, 2022 · 3 comments · Fixed by #26
Closed

Comments

@wbpcode
Copy link
Collaborator

wbpcode commented Dec 28, 2022

According to the Hessian2 standard, the string should be UTF8 encoded. However, UTF16 string is used by the Java. And when the dubbo-hessian-lite encoding the string, every UTF16 char is treated as one UTF8 char which is wrong.

Considering that most of dubbo users using dubbo-hessian-lite, we should try to provide the similar support for compatibility, even it's wrong.

@wbpcode
Copy link
Collaborator Author

wbpcode commented Jul 26, 2023

This needn't be part of the core lib. We can extend the new type support by the toHessian2/fromHessian2.

@wbpcode
Copy link
Collaborator Author

wbpcode commented Jul 26, 2023

I will keep this open because others may encounter similar problem.

@wbpcode wbpcode added wontfix This will not be worked on and removed wontfix This will not be worked on labels Jul 26, 2023
@wbpcode
Copy link
Collaborator Author

wbpcode commented Jul 26, 2023

Seems only 4bytes utf-8 cannot be handled correctly, may be we can still fix it. 🤔

@wbpcode wbpcode changed the title UTF16 string encoding support string encoding/decoding is imcompatible with dubbo-hessian-lite for four char > 0xFFFF Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant