# UTF-8 % Character issue

**URL:** <https://forum.kirupa.com/t/utf-8-character-issue/271464>\
**Category:** flash\
**Created:** [September 23, 2008, 2:24pm UTC](https://forum.kirupa.com/t/utf-8-character-issue/271464 "2008-09-23T14:24:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tinyflashman](https://avatars.discourse-cdn.com/v4/letter/t/b9e5f3/32.png) [@tinyflashman](https://forum.kirupa.com/u/tinyflashman)\
**Post date:** [September 23, 2008, 2:24pm UTC](https://forum.kirupa.com/t/utf-8-character-issue/271464/1 "2008-09-23T14:24:25Z")

</div>

Hi everyone,

I’m trying to fix a flash 8 game loads a UTF-8 txt doc into a dynamic text field. The only character that errors is the %. I tried embeding the characters in the text field within flash, but it only works half the time. When it errors, it just shows the code that’s in the .txt file.

Can someone please help with this? Do I need to put something in the AS to make that character work?

this is the code that i have in the .txt file:

```auto

&t1_ques3=For every 1%26#37; reduction in A1C, the risk of chronic complications can be expected to decrease
by what percent?<br>
   A) 15%26#37;<br>
   B) 20%26#37;<br>
   C) 40%26#37;<br>
   D) 100%26#37;<br>
   E) None of the above&

&t1_anws3=C) 40%26#37;

```

this is AS that draws in the .txt doc:

[AS]  
function loadDataFile()  
{  
myURL = \_url;  
var \_loc3 = myURL.split("\");  
myURL = \_loc3.join("/");  
nameArray = myURL.split("?");  
nameArray = nameArray[0].split("/");  
nameArrayLength = nameArray.length - 1;  
nameArray = nameArray.slice(0, nameArrayLength);  
fileURL = nameArray.join("/");  
trace ("— fileURL = " + fileURL);  
boardData = new LoadVars();  
data\_file = “gameboard.txt”;  
trace ("— data\_file = " + data\_file);  
data\_file.html = true;  
boardData.load(data\_file);  
boardData.onLoad = function (success)  
{  
if (success)  
{  
trace ("— boardData Loaded —");  
for (var \_loc2 in boardData)  
{  
\_root[\_loc2] = boardData[\_loc2];  
trace ("— str = " + \_loc2);  
} // end of for…in  
} // end if  
trace ("— t2\_ques2 = " + t2\_ques2);  
};  
} // End of the function  
\_level0.createEmptyMovieClip(“nothing”, 10000);  
loadDataFile();[/AS]

Thanks
