actionscript: unescape
- Started
- Last post
- 6 Responses
- cosmo
I am passing a url from php script to AS which is urlencoded in php, the value is passed properly but when I unescape the value in AS the url is completely different for some reason. Any suggestions?
Only a part of the url is different I must add.
- st33d0
Enlighten us with some code. The 2 urls would be most useful.
- cosmo0
It's nothing extraordinary about the code.
Original URL from PHP:
http://www.somesite.com/somefile…URL in AS:
http://www.somesite.com/somefile…var receiveData = new LoadVars();
receiveData.sendAndLoad("http... receiveData, "POST");
receiveData.onLoad = function(success){
if(success){
urlValue = unescape (receiveData.z);
trace (urlValue);} // end if
} // end function
- cosmo0
anyone?
- st33d0
I tend to avoid LoadVars, so I'm ill advised to help. My tack would have been to wrap the data in an XML and read that instead, maybe use CDATA tags if necessary.
However - I've been able to get assistance in half an hour at 2am in the morning from here:
They should be able to solve your issue without changing to XML.
- cosmo0
I was thinking about doing the whole using xml. I am too lazy to switch the code, but I guess will that a shot.
- caseyc0
Maybe try encoding the string from your php as utf-8? I dont know much about php, but found this through google...
utf8_encode($string)