Problems with #include, international characters and external txt file

Hi,

I created an animation that displays external data from a txt file, based on this tutorial. Mine is a little different, because I created 3 different text boxes for different moments of the timeline.

It worked fine, but all the international characters were weird. I found this other tutorial. The [COLOR=RoyalBlue]System.useCodePage=true;[/COLOR] method doesn’t work, because it won’t display the special characters if the user’s OS is in English (as mine is).

I tried to do it the other way, saving the file with Unicode encoding. However, I must to use #insert instead of using the following:

loadText = new LoadVars();
loadText.load("data.txt");
loadText.onLoad = function() {
    text1.text = this.text1;
    text2.text = this.text2;
    text3.text = this.text3;
};

Now the text doesn’t load. I’m also loading links from the text file into 3 buttons, and the links work fine.
I’d appreciate any help :rabbit:
Thanks!

I solved it, so I thought I’d post how I did it.

Reading other forums, I found out that if you use #include, the text is included when the swf file is published, not when the user loads it. I am using the txt file so that my client can change it whenever he wants, so #include was not a good option for what I needed (I’d have to republish the swf file every time he asked).

Anyway, I ended using the same method that is described here (using [COLOR=Blue]LoadVars()[/COLOR], etc). The textfile is just as the linked tutorial describes. I didn’t include additional quotes, spaces or the [COLOR=Blue]//!-- UTF-8[/COLOR] line. I only saved it as Unicode with my text application (BBEdit, for those interested), and it worked just fine.

The client will input the text in an administration area. It will be converted to Unicode with a PHP function, and that converted text will be automatically saved by the server as a plain text file.

Hope this helps!