1.Flex端进行编码
public function encodeStr(str:String, charSet:String):String { var result:String =""; var bytes:ByteArray = new ByteArray(); bytes.writeMultiByte(str, charSet); for (var i:uint; i<bytes.length; i++) { result += escape(String.fromCharCode(bytes[i])); } return result; }
2.Java端解码
URLDecoder.decode(trueFileName,"utf-8");
解决乱码问题。
时间: 2024-10-12 15:45:23