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.Warning: htmlspecialchars(): charset `UTF-7' not supported, assuming utf-8 in /home/bookis/public_html/wp-includes/formatting.php on line 305

 

Problem

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-

error_message

Solution

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

  • 119 Users Found This Useful
Was this answer helpful?

Related Articles

Why Videos Should Never be Uploaded to WordPress

  Video content can make a website a lot more interesting by adding additional value to a...

Optimizing WordPress

WordPress is currently one of the most popular blogging/CMS applications in use on our servers....

WordPress Home Fix

If the links in your blog show the wrong domain, redirect to another site or if they are...

How to Login to WordPress

Logging in to WordPress is as simple as visiting your WordPress dashboard URL.   Note: Your...

How to Install WordPress

WordPress is one of the most popular blogging platforms around for good reason. It is easy to...