You are here: how do xml parsers detect bad characters? « PHP Programming Language « IT news, forums, messages
how do xml parsers detect bad characters?

Posted by lawrence k on 03/19/07 18:54

2 years ago I asked, on this newsgroup, how to weed out non-UTF-8
characters from my RSS feed. I was told that I could not do so with
certainty, but I could try various tricks that would give me maybe
99%. I notice, however, that XML parsers seem to have 100% certainty
when they find bad characters. Consider the last error that I get from
this validation service:

http://validator.w3.org/feed/check.cgi?url=http%3A%2F%2Fwww.ihanuman.com%2FpdsFiles%2Frss2221.xml


What PHP code would give me this kind of 100% certainty? It seems to
me that, whatever the XML parsers do to determine a bad character, I
could also do, so as to make sure no such character makes it into my
feed.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация