BlackenedSky Posted March 30, 2007 Share Posted March 30, 2007 Hi, I'm having trouble displaying unicode characters correctly when using the DOM parser to display strings on the page. Is there any way to get it to display them correctly, or alternatively a built in php function to replace them all with the HTML code version when saving to the database. I have a php function pulling information from a database, and generating an xml document. Characters are being preserved in the database and displayed correctly when not using xml and parsing it. However, characters such as the Euro sign, ñ é etc are not displaying when parsed, just a square character (Pe�br />)which is then in turn screwing up any HTML elements after it. It is vital that I can support them as it is a website in Spanish, and an accent can be applied to ANY character, and the ñ,Ñ characters are common too. However, I got around the Euro sign problem using the HTML character code. As you can imagine it's not really feasible to create a function replacing them all with HTML codes as there is a huge range! Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.