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

How to support Chinese characters in new WebSocketClient() #365

Closed
9992800 opened this issue Jan 15, 2016 · 1 comment
Closed

How to support Chinese characters in new WebSocketClient() #365

9992800 opened this issue Jan 15, 2016 · 1 comment

Comments

@9992800
Copy link

9992800 commented Jan 15, 2016

when I add parameters at the end of url as follow:

wss:https://xxx.com/online_test?system=-1&80010086=-1&80010087=-1&userName=我是.

WebSocketClient() translate the Chinese words to ??:3

I try to change the headers , but failed.
Map<String, String> headers = new HashMap<String, String>();
headers.put("Content-Type", "application/json; charset=utf-8");

Still wrong :

write(293): {GET /online_test?system=-1&80010086=-1&80010087=-1&self=3&userName=??:3&token=a45dac5adfa4w HTTP/1.1

@9992800 9992800 changed the title How support Chinese characters in new WebSocketClient() How to support Chinese characters in new WebSocketClient() Jan 15, 2016
@marci4
Copy link
Collaborator

marci4 commented Sep 10, 2017

Hello @9992800,

you have to html encode all the chinese characters to valid html.

Greetings
marci4

@marci4 marci4 closed this as completed Sep 10, 2017
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

No branches or pull requests

2 participants