Search code examples
phpapacheopencartopencart-3

PHP Warning: html_entity_decode(): charset `UTF-8;' not supported, assuming utf-8


I am getting following error when i call to html_entity_decode() to decode web URL.

My code:

<script>
es = new EventSource('<?php echo html_entity_decode($start); ?>');
</script>

Error:

PHP Warning: html_entity_decode(): charset `UTF-8;' not supported, assuming utf-8

Php version is 7.0

Please help me to fix this issue. all answer is very helpful me

thank you


Solution

  • The default for the $encoding parameter is ini_get('default_charset'), i.e. whatever is set in your php.ini or has been set at runtime using ini_set. You have somehow set 'UTF-8;'. Remove the trailing ; (either in your php.ini or wherever you ini_set the value).