# Txt files and special letters

**URL:** https://forum.kirupa.com/t/txt-files-and-special-letters/38603
**Category:** flash
**Created:** [December 26, 2003, 5:20pm UTC](https://forum.kirupa.com/t/txt-files-and-special-letters/38603 "2003-12-26T17:20:52Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![SuperPhil](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@SuperPhil](https://forum.kirupa.com/u/SuperPhil)
#### Post date: [December 26, 2003, 5:20pm UTC](https://forum.kirupa.com/t/txt-files-and-special-letters/38603/1 "2003-12-26T17:20:52Z")

</div>

Hi All,

I used kirupa’s tutorial to dynamically load text from a txt file.

I put the following code into frame 1:

```
loadText = new LoadVars();
loadText.onLoad = onText;
 loadText.load("TEXTPERSO.txt");

```

function onText () {  
// QuotesBox.html = true;  
QuotesBox.htmlText = this.myNews;  
}

and I added the following variable into my txt file:

myNews=blah blah

This works fine as long there is no special caracter such +, é, etc.  
Do you knwo a work around to fix this and display all the caracters includ in my txt file?

Regards,  
Phil

---

<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: [December 26, 2003, 7:01pm UTC](https://forum.kirupa.com/t/txt-files-and-special-letters/38603/2 "2003-12-26T19:01:23Z")

</div>

Save the textfile as Unicode or encode the special characters.

---

<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: [December 26, 2003, 8:52pm UTC](https://forum.kirupa.com/t/txt-files-and-special-letters/38603/3 "2003-12-26T20:52:32Z")

</div>

Thanks for your advice Claudio,  
But this doesn’t work with me.

I used NotePad to save my txt file as Unicode, I tried all the possibilities:  
ANSI  
Unicode  
Unicode big endian  
UTF-8

none of them gives me the right text

I also tried to save my file as html file, but that’s not better

Could you tell me how to encode the special characters?

Anyway, thanks for your help  
Phil

---

<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: [December 26, 2003, 9:57pm UTC](https://forum.kirupa.com/t/txt-files-and-special-letters/38603/4 "2003-12-26T21:57:05Z")

</div>

Unicode didnt work for you?

---

<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: [December 26, 2003, 11:12pm UTC](https://forum.kirupa.com/t/txt-files-and-special-letters/38603/5 "2003-12-26T23:12:56Z")

</div>

unfortunately not

Please, explain to me how to encode the special characters.

thanks  
Phil

---

<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: [December 26, 2003, 11:30pm UTC](https://forum.kirupa.com/t/txt-files-and-special-letters/38603/6 "2003-12-26T23:30:23Z")

</div>

[http://www.macromedia.com/support/flash/ts/documents/url\_encoding.htm](http://www.macromedia.com/support/flash/ts/documents/url_encoding.htm)

---

<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: [December 27, 2003, 12:36am UTC](https://forum.kirupa.com/t/txt-files-and-special-letters/38603/7 "2003-12-27T00:36:30Z")

</div>

Great Claudio!

I searched the web I found also to set  
system.useCodepage = false;

But this gives weird results

So I used the URL encodings shown in the web page you indicates and it’s working fine now!

I now have to transform the special characters programmatically

Many regards to you  
Have a good time programming Flash  
Phil
