Greywacke Posted April 19, 2010 Share Posted April 19, 2010 hi again,this problem has resurfaced and i am not sure how. the database contains the characters represented by the “ and ” html entities, but the xml is returning them both as � despite being defined as <?xml version="1.0" encoding="utf-8"?> this has even been tried as <?xml version="1.0" encoding="UTF-8"?> with the xhtml 1.0 document having <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> in the header and accept-charset="utf-8" as a form attribute.should they all be UTF-8 or utf-8, if not - where should they be which? Link to comment Share on other sites More sharing options...
Greywacke Posted April 19, 2010 Author Share Posted April 19, 2010 i've attempted following the recommendation in a kirupa forum post, but to no avail.even with the encoding set in the header, both the left and right double quotes are displayed as �. perhaps i need to replace them with the html entities?well this did not work. “ and ” are not recognised xml entities. neither do the characters want to display on a utf-8 encoded xml document. :/starting to lose my focus again, please help! Link to comment Share on other sites More sharing options...
Synook Posted April 19, 2010 Share Posted April 19, 2010 What is the actual character encoding of your document? Link to comment Share on other sites More sharing options...
Greywacke Posted April 19, 2010 Author Share Posted April 19, 2010 utf-8but i have found the entities to be displayed, and they display as the characters no longer that question mark in the square character.i just had to replace the left and right slanting double quotes with “ and ”.issue resolved! Link to comment Share on other sites More sharing options...
boen_robot Posted April 19, 2010 Share Posted April 19, 2010 The numeric entities are only required if you have the character encoding wrong. If you have it right, you can write the cahracter literaly, with no entity of any kind.Are you absolutely sure that your file is encoded as UTF-8? If you open Notepad and click "Save As...", do you see "UTF-8" in the encoding dropdown? If not, set it.Other than that, the header() line from the forum post you linked to is the critical part, only replacing "text/xml" with "text/html". Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.