We've been populating dynamic content in Flash for a few years now. The other day, I was faced with the task of populating Spanish text into a Flash movie via XML. The underlying code is the same, but when I published my movie and viewed it online I noticed that the special characters didn't show up. What went wrong? After spending several hours reading through forum posts and tech notes, I found the solution. Here's what you need to do:
1. Embed Special Characters in Flash
For starters, we need to make sure that all of the special characters (i.e. á, é, í, ó, ú, etc.) are embedded in our flash movie. You also have to make sure those characters are available for the font you're using. The "Character Map" application in Windows will be a big help. If you're not familiar withCharacter Map, you can find it here: Start > Programs > Accessories > System Tools > Character Map
2. Use UTF-8 Encoding
Next, make sure that your XML document uses UTF-8 encoding. To endcode the XML as UTF-8, make sure the first line of your XML file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
3. Save as UTF-8
Almost all text editors default to ANSI encoding. When saving your XML file, be sure to select "UTF-8" from the "encoding" drop down menu.
4. Upload as Binary
When uploading, it's important to note that your XML document should be transferred as a binary file. Most FTP programs will auto-detect this, but if you're having problems set the transfer type to binary before you upload the file.
¡Buena suerte!