Thank you so much! You saved my life heheheheheheheheheh. Actually your tip it was a little bit wrong. I've changed and it works. If someone have the same trouble it is just add at the beginning of the code:
$xml = "xEFxBBxBF";
And in script that generate the file:
$fw = fwrite($fp,utf8_decode($xml));
It's to decode the string to print on the screen, but I have to thank Mr. Rahul Kumar for help me to see my error. Thanks again!
Rodrigo Nascimento