PDA

View Full Version : Special Chars


pq42
07-19-2004, 12:36 PM
hello everybody,

using sendAndload method

I got the next problem with the data catched from flash.

If i make the next string in php n=0&firstName=Pablo&lastName=Ques&ada, i get in flash ada=&lastName=Ques&firstName=Pablo&n=0&onLoad=[type Function] and that's not correct. Flash has made a new var called ada and has broken the content of lastName 'Quesada'. Other problem is if my name is Pab%lo i got in flash 'Pabo' as '%' char suprime the next one. Is there a way to fix thouse problem? i'm thinking in code a function to parseLoadVariables but i'm not skillful enough yet.




I'll thanks you any kind of help.

Billy T
07-19-2004, 10:49 PM
might need to

urlencode(theData) in php before you send it and then

escape(theData) in flash

pq42
07-21-2004, 09:32 AM
thanks you Billy T for your reply, help me for the first steps :). As you told me i urlencode(theData) in php and it works correctly, but i dont know why, Macromedia Flash MX 2004 Pro automatically 'unescape' theData (i think you mean unescape and not escape in your reply. Anyway, none of two sentences work propertly :P).

As i said, theData is unescape automatically so, i only need escape it if i go to pass it to a function for example.

But i already had problems with some special Chars like בהא... so i enable system.useCodepage and the beginning of the code and finally all is working ok :).

Thanks you one more time for the help and excuse my english (i do my best :)

Billy T
07-21-2004, 10:26 AM
cool glad its working

yeah I think the data is 'unescaped' if you use onLoad but not onData

cheers