Alain Williams wrote: > I am trying to use this to validate input that is supposed to be UTF-8 and to > replace any bad characters with something - '?' would do. > > I have the test program below. No matter what I try to give as an argument to > mb_substitute_character() it always removes the bad input sequence, I would like > to replace it. Have you considered using htmlspecialchars($input, ENT_SUBSTITUTE, 'UTF-8') instead of mb_substitute_character()? -- Christoph M. Becker -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php