-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
WxPayServiceImpl的post方法,编码转换存在BUG #225
Comments
试了下在线编辑,不知道对不对 |
能否详细说下,是哪些接口可能会有问题?而且你测试过了没有,能否保证你的代码对所有接口都是可行的? |
@binarywang 服务器返回错误信息时,中文全是乱码,说明response返回的不是ISO_8859_1编码,EntityUtils.toString方法,会优先判断response指定的编码 |
我知道, 但EntityUtils 这个类是httpclient的,跟我们项目里使用的jodd-http不是同一个东西,无法使用。 |
另外,我刚跑了下单元测试里的代码,没有乱码现象发生,所以我不确定你所说的乱码是怎么回事 |
没有进一步的信息可以排查,暂时关闭 |
我又仔细测试了下,有的接口会乱码,有的不会,不能一概处理,需要仔细区分下 |
目前观察到的情况很复杂,同样的接口在有正确响应情况下的编码与出现错误的响应编码可能还不一样,而不同的接口情况还可能不一样。 |
binarywang
added a commit
that referenced
this issue
Jun 18, 2017
已修复 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
服务器返回值的编码并非全是ISO_8859_1,建议更换为:EntityUtils.toString(response.getEntity(), Consts.UTF_8);
The text was updated successfully, but these errors were encountered: