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 brukere syntes dette svaret var til hjelp
Var dette svaret til hjelp?

Relaterte artikler

How to Add a Full Screen Background Image in WordPress

The use of background images on WordPress sites has become increasingly popular recently.Â...

How to Add a PDF Download to Posts in WordPress

To add a PDF to a WordPress post, from the left-hand navigation menu in WordPress: ClickÂ...

Disable/Enable All WordPress Plugins via the Database

  If your WordPress admin login page is only showing a blank screen, it could be due to an...

How to Change Your WordPress Login Username

If you do not want to use the default login username for WordPress, there are two options for...

Restrict WordPress Site Access by IP or Logged in Users

If you need to redirect restricted visitors to a specific page or prevent them from having...