Txt files and special letters

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;

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?


Save the textfile as Unicode or encode the special characters.

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:
Unicode big endian

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

Unicode didnt work for you?

unfortunately not

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



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