It ain't a dumb question, and is most easily answered by sending you to pp 576 of Colin Mook's "ActionScript for Flash - The Definitive Guide". If you're doing a lot of Flash work this book is practically a "must have".
Are you using LoadVars class(Flash MX) or the LoadVariables (Flash 4) method? I'll assume the former, as that's where your problem is addressed. Without doing a lot of typing, here's the relative bit, regarding formatting of variables transferred by load() or SendandLoad():
.
.
.
Any character that is not a space, a number (1-9), or an unaccented Latin 1 letter (a-z or A-Z) is replaced as follows:
- If system.useCodepage is false, the default, the character is replaced by one or more hexadecimal escape sequences of the form %xx, representing the UTF-8 sequence for the character. ...
.
.
.
And it goes on for another 3/4 page. Try Googling for "Flash System.useCodePage UTF-8" There are a number of combinations of conditions which the book addresses.
You can evaluate this yourself in Flash with
trace(escape("é"));
which should display %C3%A9 - two characters to PHP. Feed that to PHP without some kind of transforming function and guess what you come up with!
Flash is encoding your string, PHP receives it, and then translates it to what it knows/is working in. We were sending very simple date values, so the LoadVars class worked, but were receiving unpredictable text. For that we used the XML() class.
Have a look at http://ca3.php.net/manual/en/function.utf8-decode.php and other PHP functions associated with unicode. You will have a bit of futzing to do here.
Hope this steers you in the right direction - Miles
At 02:00 PM 1/27/2005, Carolina Silva wrote:
Hello everybody!
This might be a dumb question but i'm having a bit of trouble here:
I'm making a contact form in flash MX: the swf sends a string with the variables through a loadVariables function. The string is read by a php file. All the vars get their value through a $HTTP_POST_VARS [] function and are sent to an email.
The thing is that the special characters such as ñ or á are changed. If I write "méxico" id the swf file... the php send the email with the value "méxico". Can someone please tell what can I do to fix this?
Thanks for your help, Carolina
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php