Hi
I am having a lot of trouble getting Flash to display danish characters.
I am writing data to Flash from a mySQL database using PHP.
I have tried using the utf8_encode function in PHP 4 and the newer iconv
function in PHP 5.
Neither work!!_??
The text field is fine... I tested it using a normal utf8 encoded txt file.
Am I missing something here?
Can anyone help?? please :D
mxc
jools2005 - 21 Apr 2005 15:42 GMT
I am having the same problem.
I am trying to retrieve data from MySql and load into a dyanmic text box, this
is easy enough but as the content contains special characters, latin in my case.
the latin chars are dropped along with the next char to it.
I know the content in the table is un utf-8 and that the php file is sending
it with the code for the special chars. I have tested the contentType and its
x-www-form-urlencoded but not sure if this is right?
So why is it not showing them, oh and yes I have specified the latin
characters in the text field options.
Jools
mxc - 21 Apr 2005 16:49 GMT
I have the solution to the problem so drop me mail at mxc@moozeek.com and I will help u out.
Also the solution is posted on the flashkit forum ;)
jools2005 - 21 Apr 2005 17:14 GMT
Hi
You have mail....
although I have tried the $varC = utf8_encode($varB); option and this help to
some extent.
Before the disruptive special char was causing problems with the next char and
the line spacing on that line but not it doesnt but it stil ignores that char.
I think the $varC = utf8_encode($varB); option works to some extent but as
soon as you urlencode to post it back it loses it. :(
Jools
jools2005 - 22 Apr 2005 11:46 GMT
Just for anyone browsing or similarly stumped, the solution to this was to use
utf8_encode($var); as your response from the php scripts.
Although there is one side affect to this, if you have ampersands in you your
data, once utf-8 encoded and sent to flash, flash thinks these are there next
name/value pair and will tuncate the data there.
I have tried using the suggest unicode code for an ampersand '\U0026' and the
ususal one '\+U0026' but these dont seem to work, if anyone has any ideas how
to get these to show up, I am all ears.
Cheers
Jools
LuigiL - 29 Apr 2005 13:46 GMT
Somewhere I read you have to escape these characters: \\U0026 but this would
mean you would have to use ereg_replace() to do this before you pass the data
to Flash.
An alternative is retrieving the data via PHP/XML. All content with special
characters is encoded with utf8_encode() and then parsed as a CDATA-section in
the XML-file. All characters are then displayed correctly.