Jump to content

PHP, XML, UTF-8, and XHTML validation


elg2001

Recommended Posts

Hi,
I'm having some trouble with the backend of my website. It's blog software that takes the input from a text field (title) and textarea (body contents) and stores it into an XML node in UTF-8. However, occasionally I'll get a validator.w3.org validation error on my website saying the following:

[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Error Line 14 column 167: non SGML character number 156[/quote]

for example. I believe it's a unicode character, but i'm not sure. Basically, are there any built-in functions that will translate any input text to a valid UTF-8 character? If there is not an acceptable replacement, then use a particular character to replace unrecognizable characters. For instance, a double width dash shows up as invalid on my site, so replace that character with a question mark.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.