XML encoding problem
- Started
- Last post
- 17 Responses
- sajets_v2
I searched but couldn't find anything in here. Searched google, kirupa but still nothing i got from there helped me out.
I have a MP3 player and i'm loading songs tp Flash with XML. The problem is, that the band name that this player is for has "É" in the name but Flash doesn't show it. Been tring to define encoding in XML file or using System.useCodepage = true; action in Flash or trying to use special character codes in XML but nothing works.
I know it is easy but i just can't get it to work.
Cheers in advance.
- UndoUndo0
if yr generating the xml with php wrap the output with utf8_endcode() - this might help.
are you sure the font you are using supports the character you want?
- blaw0
declare the encoding in the xml doc.?
----
in case that code doesn't display, this without the extra spaces:
< ? xml version = " 1.0 " encoding = " UTF-8 " ? >
- sajets_v20
blaw, i've done that but it doesn't work. and as i'm using Verdana there should be no problem with displaying that character.
- UndoUndo0
Ive just used the É char here in an xml file _> flash and it works fine with a non standard pixel font - so you must have missed something. are you keeping the data in between nodes or are you using CDATA?
- sajets_v20
this is what i have basically in my XML file
- UndoUndo0
sajets use [ instead of > or http://www.pastebin.se
- joyride0
are you embedding the fonts?
- enjine0
problem solved:
http://www.w3schools.com/xml/xml…
- sajets_v20
Thanks UndoUndo, will try it right away.
Joyride: no, verdana is supposed to be a system font.
I might try to change the font itself to lats say Arial, but the .fla file is at home but i'm in work right now.
- sajets_v20
still nothing... even if i use the special character codes instead of é and it still nothing
- UndoUndo0
you dont have to use CDATA if you dont want to. i tried it in a node and it worked fine ie:
yourFunnyChar
- sajets_v20
sajets use [ instead of > or www.pastebin.se
UndoUndo
(Sep 12 06, 05:41)you mean i should use these [] brackets instead of these everywhere in my XML?
Sry i'm not good at all with this coding stuff :)
- lvl_130
i think undo is talking about using [ here at newstoday so it doesn't strip your code out. not in your actual xml...i think anyway : )
- UndoUndo0
what lvl_13 said.
whay not paste yr code for xml document in the pastebin and we might be able to help.
- sajets_v20
code is there.
My browser displays the é correctly if i open the .xml file but Flash doesn't.
- UndoUndo0
okay ive reorganise yr xml the way I would do it - you will need to change yr flash code but this will work for you
- sajets_v20
thanks... i will try it when i go to home. Don't have the .fla file here at the office.