We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c3ddd87 commit 65e3fa1Copy full SHA for 65e3fa1
core/src/main/java/com/wechat/pay/java/core/http/apache/ApacheHttpClientAdapter.java
@@ -104,11 +104,11 @@ private HttpEntity buildApacheHttpEntity(
104
if (wechatPayRequestBody == null) {
105
return new StringEntity("", "");
106
}
107
-
+ // 指定ContentType参数为UTF-8, fix issues #352
108
if (wechatPayRequestBody instanceof JsonRequestBody) {
109
return new StringEntity(
110
((JsonRequestBody) wechatPayRequestBody).getBody(),
111
- ContentType.create(wechatPayRequestBody.getContentType()));
+ ContentType.create(wechatPayRequestBody.getContentType(),"UTF-8"));
112
113
if (wechatPayRequestBody instanceof FileRequestBody) {
114
FileRequestBody fileRequestBody = (FileRequestBody) wechatPayRequestBody;
0 commit comments