Re: Help needed with mb_convert_encoding()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux