Private Function Httpencoding (param:string): string{//transcoding
return encodeURIComponent (param);
}
Private Function Openselfstr (deletestr:string): string{//decoding
Return decodeURIComponent (DELETESTR);
}
-------------------------------------------------------------------------------------------------------
After the URL is added to the parameters passed in Chinese, the background will not be the value. Then you need to transcode it.
Flex Transit Code functions: Escape,encodeuri,encodeuricomponent
Corresponding decoding function in Flex: unescape,decodeuri,decodeuricomponent
First, escape outputs the%u**** format when encoding Unicode values other than 0-255.
In other cases the Escape,encodeuri,encodeuricomponent encoding results are the same.
Second, encodeURIComponent is the Chinese, Korean and other special characters into the Utf-8 format URL encoding, so if the background to pass parameters need to use encodeURIComponent background decoding to Utf-8 support
Ps:
Escape does not encode characters with 69: *,+,-,.,/,@,_,0-9,a-z,a-z
encodeURI does not encode 82 characters:!,#,$,&, ', (,), *,+,,,-,.,/,:,;,=,?,@,_,~,0-9,a-z,a-z
encodeURIComponent does not encode 71 characters:!, ', (,), *,-,.,_,~,0-9,a-z,a-z
HTTP URL transcoding and decoding for Flex