Unrecognized input encoding signature

I got this weird console error on IE 11.

XML5605: Unrecognized input encoding signature. Line 0, Column 1

Anyone know how to fix this error ? It doesnt break anything but I hate to see error on IE

You can check if there are no white-space characters or everything is properly encoded with UTF-8.

Could you pls elaborate how do I check ?

It also shows for brand-new Yii 2 application as well.

Sorry, I’ve meant “non printable”. Those problems are hard to identify. You can have there characters that is not liked by xml for example.

You can try to remove all non printable characters and see if the string is the same length. Code like ctype_print or iconv(“UTF-8”, “UTF-8//IGNORE”, $string) or preg_replace(’/[^\p{L}\s]/u’,’’,$string) might be useful.

On the other hand if only IE alert this the problem may be something different.

I was getting this as well. Disabling the Yii2 Debug Toolbar (well, setting "YII_DEBUG=false;" prevented the errors.