Flash, xml CDATA Q
- Started
- Last post
- 7 Responses
- NegativeSpace
I have some xml that I am loading into flash, and both content is body copy with apostraphies etc.
I have used the cdata tag in order for those characters to be read like text and not code like this:
However I still get say an apostraphie like " Tom's" looking like " Tom's "
Anyone know what might be causing this, CDATA is supposed to prevent this and as far as I know there is nothing special you have to do when you load content in a CDATA tag.
- nuggler0
Not quite sure this is what you need, but it helped me once:
The Macromedia Flash Player 6 assumes that all external text files associated with a Macromedia Flash Player 6 movie are Unicode encoded, unless you tell the player otherwise. If you use external text files that are not Unicode encoded, you can set system.useCodepage = true to tell the Macromedia Flash Player 6 to use the traditional code page of the operating system running the player.
- NegativeSpace0
Thanks for the reply. I just tried that but it does not seem to work.
Its really weird, CDATA is supposed to let me use these characters. I have emdeded all those chacraters for puntuation in there also.
- Solid0
Are you saying your having trouble displaying a 'real' apostrophe?
1/ have you saved the xml file in UTF-8 format?
2/ does your font support the character your trying to display?
3/ is flash displaying a square where the apostrophe should be?
4/ what happens when you trace the contents of your xml/cdata to Flash's output window?
Can you post your xml?
http://pastebin.coconut.se/
- NegativeSpace0
The xml:
http://pastebin.coconut.se/?id=4…
I am not positive about the UTF-* format, I wrote my xml in the latest version of dreamweaver selecting a new xml document.
The character is definitely present in the typeface and has been embeded.
It is not displaying a square, it is displaying ' in place of it. It is the same when I trace it.
Thanks, hope this helps.
- Solid0
I copy/pasted an apostrophe into your pastebin sample.
What happens if you try that?
FYI I just tested tested it and the apostrophe traces properly ...
- Solid0
btw. DW doesn't save UTF-8 by default - you might have to check your settings in "Edit > Preferences > New Document > Default Encoding"
- NegativeSpace0
I checked the encoding it was UTF-8.
I guess it must be a problem with using a ' instead of a true ’.
Thanks solid.