XML file encoding problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
excultus
Forum Newbie
Posts: 5
Joined: Fri Jul 28, 2006 9:29 am

XML file encoding problem

Post by excultus »

Hi guys!

I have a problem with XML file encoding. I have a php script that saves xml, I set the XML header to use encoding UTF-8 and I use utf-8_encode() php function to encode the text I write into nodes. It would be all right if I wanted to read the XML from PHP, I'd use utf8_decode() function and no problem but I want to read the XML from Flash and here I'm stuck.

The XML file is actually encoded in ANSI and UTF chars are like escaped or what; I figured out that when I change encoding i.e. in notepad to UTF-8 it works until next write to the file (from php; it changes encoding back to ANSI). So I want to change the encoding of the file from ANSI to UTF-8. But I cant find any way to do this using php.

Thanks for help!
Post Reply