Resolve Warning: htmlspecialchars(): charset `UTF-7′ not supported, assuming utf-8

I  recently got this warning message on one of WordPress site I am admin at. This error occurred after updating  the WP site to latest version.



htmlspecialchars() is a PHP String function which converts special characters to HTML entities.So once a special character encounters it converts it to a HTML entities.

for example:

  • ‘&’ (ampersand) becomes ‘&’

WordPress default charset it  utf-8. During updating WordPress or theme etc some times the charset changes to UTF-7.

You Can see the changed charset in WP admin Dashboard in   Settings => Reading.

It will be something like this-



The solution of the problem is that change  character encoding to UTF-8 above and Refresh the site. The error should be resolved.

Let me know if you have any questions. 

Related posts

Leave a Comment