Recently, HTTPClient is used to make analog form submission procedures, and find that this 咚咚 中 中 中 支持 实 差 实, 后 问题 问题 问题 问题 问题 问题 出 里 里 在 在 里 里 在 在 在 在 在 在 在 在................................................................. Apache / Commons / httpclient / methods / multipart This package StringPart.java and FilePart.java in these three classes. Let me talk about Encodingutil, although you can see Private Static Final String default_charset = "ISO-8859-1" in Chapter 50; this definition, but you will find GetASCIibytes (Final String Data) this There is no use of this defined encoding to encoding the data. It is used to use the US-ASCII code to make Encoding. The procedure is as follows: public static Byte [] getasciibytes (final string data) {
IF (DATA == Null) {throw new illegalargumentException ("Parameter May Not Be Null);
Try {Return Data.GetBytes ("US-ASCII"); // is this sentence pull} catch ("httpclient requires asclientEth);}} The code is yourself Bar. Here, I solved the problem of uploading the file name Chinese. Next to solve the problem of the Field field content to modify StringPart 58 lines: public static final string default_charset = "US-ASCII"; Simple Remember to introduce the two packages of Logging and Codec. Otherwise, compile a bunch of errors. In fact, in StringPart is a method of customizing the format. But there is no implementation in the FilePart class. Chapter 79: Public StringPart (String Name, String Value, String Charset) {