# Problems with #include, international characters and external txt file

**URL:** <https://forum.kirupa.com/t/problems-with-include-international-characters-and-external-txt-file/64211>\
**Category:** flash\
**Created:** [September 14, 2004, 7:02am UTC](https://forum.kirupa.com/t/problems-with-include-international-characters-and-external-txt-file/64211 "2004-09-14T07:02:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nell](https://avatars.discourse-cdn.com/v4/letter/n/e480ec/32.png) [@Nell](https://forum.kirupa.com/u/Nell)\
**Post date:** [September 14, 2004, 7:02am UTC](https://forum.kirupa.com/t/problems-with-include-international-characters-and-external-txt-file/64211/1 "2004-09-14T07:02:37Z")

</div>

Hi,

I created an animation that displays external data from a txt file, based on this [tutorial](http://www.kirupa.com/developer/mx/externaldata.htm). 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](http://www.kirupa.com/developer/mx/international_characters.htm). 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:

```auto
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 🐇  
Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 14, 2004, 10:43pm UTC](https://forum.kirupa.com/t/problems-with-include-international-characters-and-external-txt-file/64211/2 "2004-09-14T22:43:26Z")

</div>

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](http://www.kirupa.com/developer/mx/externaldata.htm) (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!
