View Full Version : changing non utf8 characters to utf8
01-18-2009, 03:59 PM
i am pulling data from a xml file(product feed) and some of the info is displaying as.
1/ white box instead of a pound sign
2/ 's instead of '
how do i make the data display properly?
ive tried the following, which got rid of some of the lt; rt; problems but im not sure how to solve the above
$desc = html_entity_decode($item->desc);
01-19-2009, 07:00 AM
i am pulling data from a xml file(product feed) and some of the info is displaying as. Are they in the correct utf format inside the xml file?
01-19-2009, 10:47 AM
no the xml file contains incorrect characters e.g
If you missed the selection for the last Winter Olympics, now's your chance to practise in time for the next one
but at he top of the file it says
<?xml version="1.0" encoding="UTF-8" ?>
01-19-2009, 11:11 AM
Why do you need to decode it then? Browser outputs
[...]Winter Olympics, now's your chance[...] when we simply print that line as such.
01-19-2009, 01:07 PM
when i print out the info i get the html code instead of the ' when viewing in the browser?
i decoded it because i was getting stuff like lt; displayed and other html tags but this removed them, but i still get some html code appear.
here (http://www.kernow-connect.com/stores.php?Cat=ent&sID=iwantoneofthose)is one of my pages which i am having trouble displaying the xml contents.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.