跟踪源码 发现 org/apache/commons/httpclient/util包下EncodingUtil.java编码用的是"US-ASCII"所以替换掉EncodingUtil
/**
* Converts the specified string to byte array of ASCII characters.
*
* @param data the string to be encoded
* @return The string as a byte array.
*
* @since 3.0
*/
public static byte[] getAsciiBytes(final String data) {
if (data == null) {
throw new IllegalArgumentException("Parameter may not be null");
}
try {
return data.getBytes("US-ASCII");
} catch (UnsupportedEncodingException e) {
throw new HttpClientError("HttpClient requires ASCII support");
}
}