Forum Moderators: open

Message Too Old, No Replies

problems with UTF-8 enconded .txt file in Flash textField

"." shows up at the beginning of the text.

         

wehateworking

4:51 pm on Jul 13, 2005 (gmt 0)

10+ Year Member



Hi, I need to load external text files into some Textfields. They have to be UTF-8 enconded to display special German characters.

If I encode with ANSI, all is ok except the special characters.
The moment I encode as UTF-8, a special "." character shows up at the beginning of the textfield which is not in the .txt file.

I don't know what to do? Please help.

I am using Flash MX 2004, loading the .txt files with the code:

//

var lvData:LoadVars = new LoadVars ();
lvData.onData = function(sData:String):Void {
referencesText.htmlText = sData;
};
lvData.load("content/texts/references-html.txt");

stop();

//

and enconding the files with Notepad on Windows XP Professional.

Thank you

Richard_N

5:37 pm on Jul 13, 2005 (gmt 0)



dont you need to embed the fonts/character sets in the movie and make them available at runtime?

wehateworking

5:45 pm on Jul 13, 2005 (gmt 0)

10+ Year Member



I forgot to mention that I am using a system font _typewriter

so I guess that's no it.

Richard_N

5:57 pm on Jul 13, 2005 (gmt 0)



do a search at macromedia, you do need to embed a character set in the movie otherwise it uses the unicode standard by default.

Flash can be set to use double byte japanese characters by this method so I would be pretty certain it can do what you need it to.

wehateworking

6:25 pm on Jul 13, 2005 (gmt 0)

10+ Year Member



Embeding Basic Latin (95 glyphs) in the Textfield causes the text to display very differently and kind of blury. And the special German characters like ö don't show.

Embeded Latin Extended A (548 glyphs) and the text does not show at all.

Meanwhile I discovered that in Mac OSX, both Safari and Explorer do not show the strange "." character that I get in Windows, IE.
So for mac, what I did is enough, but somehow for PC is not.
I have tried using other Text Editors besides Notepad, but the result is the same.

Thank you for your help anyway.

wehateworking

3:20 pm on Jul 15, 2005 (gmt 0)

10+ Year Member



Just to let you know I solved the problem.

I had a "main.swf" loading the SWF with the textfield to level 1.

Turned out that "main.swf" was an older file made with Flash 5 and AS1.

Re-exporting it as AS2 for player 7 solved the mysterious dot problem.