I use function htmlspecialchars()
in PHP and cyrillic symbols.
I get error:
Message: htmlspecialchars(): charset `utf8' not supported, assuming utf-8
Is there alretnative htmlspecialchars()
or solution for this charset?
PHP code:
$text = htmlspecialchars($text, ENT_QUOTES,$charset);
Remember to call filter_input(INPUT_GET, 'name', FILTER_SANITIZE_STRING);
first if you bring the data from a REQUEST to this arena. This is what you need in order to use htmlspecialchars:
$text = htmlspecialchars($name, ENT_QUOTES, 'UTF-8');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With