Why does TextAsset remove the markup from a txt file?

I have the following text file in my Resources folder named Test.txt

TEST<color=‘#ff1eff00’>{0}\n

I’m using the following code to load the file

TextAsset textdata = Resources.Load(“Test.txt”) as TextAsset;

Why does textdata.text have the markup removed?

TextAsset doesn’t remove any markup; it’s just characters and Unity doesn’t inherently know or care what characters they are. It would have to run some kind of parser in order to remove markup, which is of course quite unfeasible for obvious reasons. Proof:

var data : TextAsset;

function Start () {
    for (var i = 0; i < data.text.Length; i++) {
        Debug.Log (data.text[i]);
    }
}

–Eric

What makes you think it’s removing markup?

thanks for your help. I was using markup that I pasted into the text file. When I recreated a new text file by hand and then saved it as unicode text the problem disappeared. I suspect the file became corrupted or it had special characters in it.