Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Issues saving xml as UTF8
09-12-2008, 02:20 PM #1
- Join Date
- Jun 2005
- Thanked 0 Times in 0 Posts
Issues saving xml as UTF8
I'm running into some problems w/ UTF-8 encoding on a XML file. I'm getting some values from my db (that is all stored as UTF-8) and creating an XML file from it. I have tried a few different variations and am getting nowhere. My end goal is to have the text render correctly in Flash (instead of gettting the box characters). I know it's working correctly on the Flash side because if I save the same XML file w/ my text editor with UTF-8 encoding it renders correctly. Here's some code I'm using with some comments mixed in from different variations of my attempts.
$exporttext = "some text w/ special characters like ™";
$enctype = iconv_get_encoding($exporttext);
//$exporttext = iconv($enctype, "UTF-8", $exporttext);
$fh = fopen($myFile, 'w') or die("can't open file");