-
Notifications
You must be signed in to change notification settings - Fork 2k
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
汉字会乱码或显示出错 #21
Comments
js调用Java,在1.0.2版本的没有中文乱码的问题,升级到1.0.3Java这边接收到的中文就变成乱码了。 |
@imliujun 我检查一下,添加base64主要就是为了处理一些中文在某些版本的webview上,使用urlencoder乱码的问题 |
@xiangding1983 @imliujun 感谢反馈,暂时回退回使用URLEncode的方式,base64我再找原因,请使用1.0.4 |
base64导致中文乱码原因是:虽然Html和JS的编码都是utf-8,但JS从页面上得到的中文编码却是utf-16,所以直接对中文进行Base64编码将得到错误的结果,所以我们要先从utf-16转到utf-8再编码。 |
@allenzerg001 thx |
bridge.callHandler('test',{"content":"乐乐乐乐"}, function(response) {
alert(response);
}
类似这种, 在android里,取到content时,汉字不正确了,
The text was updated successfully, but these errors were encountered: