1.The browser running in the client�s native locale encodes the form parameter data in the HTTP request so that it is in a readable format for the web application. Well, the browser can encode data however it wants. A browser running in Japan might encode in Shift-JIS. If my web app server is running in the US, I wouln't necessarily call that a "readable format" unless it's decoded correctly.
2.When the web application receive the data, it is in Unicode format.in another word they be encoded with UTF-8 encoding. Mmmm... is this data being sent as parameters of an HTTP request? Or (more rarely) as part of the
body of a request? If it's a parameter, and you're processing the request with a
Servlet, then getParameter(name) returns a String. This String has already been decoded from whatever encoding was used by the browser.
If the data is in the body, you need to use getCharacterEncoding() to learn what encoding was used. Then use something like
Now you can convert the request body to Unicode chars.
3.The web application extract the data using OS default encoding.(so may be ISO-8859 serials or Shift_JIS) No, it's either a String, or it's an InputStream encoded in whatever encoding the browser chose to use. The web application's default encoding may be completely different from the default that was used by the browser. Never use default encodings when you're exhanging data between different machines which may have different defaults.
4,We need use getString(string, encoding) to get useful info Or a new InputStreamReader(InputStream, encoding). Or some other classes in java.nio if we prefer.