Jones, Douglas 1 wrote: > I'm wondering if anyone knows of a filter that can take data to be wrapped > in XML tags and filter this data encoding any illegal XML characters or, > if they cannot be encoded, remove them. The problem I have is a database > that contains text that must be wrapped in XML. Some of this text has > illegal characters in it (probably copied from MS Word). Some of the > characters that keep popping up are not very frequently used, so I'm > hoping whatever filters get suggested, they can simply strip out these > characters if they cannot encode them. In the user-contributed section of the PHP manual, under htmlentities, I think, there is a nice chunk of code that tells you how to replace all those stupid non-ASCII Microsuck Word characters with the HTML equivalent that will be closest to what it was in Word. Very very nice. It might not be in htmlentities, though -- You'll have to dig around for it... If I could just remember which project I pasted that into, I'd just post it again :-) -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php