//string转换成gb2312类型
static public function urlencodeGB2312(str:String):String
{
var result:String ="";
var byte:ByteArray =new ByteArray();
//如果需要转换成其他的类型,如gbk,big5直接把gb2312改成gbk或者big5就行了
byte.writeMultiByte(str, "gb2312");
for(var i:int;i<byte.length;i++){
result += escape(String.fromCharCode(byte[i]));
}
return result;
}
static public function urlencodeGB2312(str:String):String
{
var result:String ="";
var byte:ByteArray =new ByteArray();
//如果需要转换成其他的类型,如gbk,big5直接把gb2312改成gbk或者big5就行了
byte.writeMultiByte(str, "gb2312");
for(var i:int;i<byte.length;i++){
result += escape(String.fromCharCode(byte[i]));
}
return result;
}