WebStorm Encoded my HTML File as UTF-16BE

If you use webstorm you’ve probably run into this issue before. It use to happen more in past versions when I would add non-UTF-8 characters to my files. Basically, webstorm would output the wrong file encoding.

To get around this you really only have one option. To re-encode your file content and filter it yourself. If you simply copy the wrongly encoded file output and try to paste that into a UTF-8 file, it will re-encode and you end up back where you started.

You have to replace the file:

[pastacode lang=”bash” manual=”iconv%20-f%20UTF-16%20-t%20UTF-8%20%5Bpath%2Fto%2Ffile%5D” message=”” highlight=”” provider=”manual”/]

Blam.

If that doesn’t work, you can do the step above to sanitize, then copy the content and make a new file (UTF-8) and paste.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.