1, the front desk Chinese passed to the background garbled.
The front desk does not need to be processed
The system will generally convert Chinese to iso-8859-1 type by default.
Just accepting data in the background is processing
STR is the Chinese string sent by the front desk:
String Inputer = new String (Str.getbytes ("iso-8859-1"), "GB2312");
2, the front desk not only includes Chinese. and include special characters, it is difficult to assume that transcoding is only in the background. The use of the front-end transcoding, then the use of the background decoding method of processing
Urldecoder.decode (Thevcorigin, "UTF-8");//Background decoding. The number of references (the string to be decoded, what encoding type to turn to)
String FilePath = Urlencoder.encode (FilePath, "Utf-8"); Java transcoding
Page and background pass Chinese garbled problem (Java garbled)