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]);
}
}
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.