"UTF-8 (charset is auto-detected from content)" when I want it to be ISO-8859-1
Answered
Settings dialog show Editor > File Encodings , Encoding as "UTF-8 (charset is auto-detected from content)" and is non-editable for an xml file without any hardcoded charset in the file. I need to have it encoded in ISO-8859-1. How can I change the encoding? The encoding in the status bar att the bottom of the Intellij window saying UTF-8 is greyed out.
Please sign in to leave a comment.
You can specify encoding in the XML file prolog:
For different reasons I don’t want to use that hardcoding. I just want to tell Intellij what encoding it is by e.g. using the status bar item and set it to ISO-8859-1. Why is it greyed out?
If I open it in e.g. emacs it is recognized as ISO-8859-1; why does not Intellij do the same?
I've created a bug, please follow it for updates: https://youtrack.jetbrains.com/issue/IDEA-285875.
Hi, the issue is still not resolved, is there any workaround for jsp files?
Leopold12 Hub What's the problem with setting encoding in JSP files?
<%@ page contentType="text/html; charset=UTF-8" %>The project Im on is encoded in windows-1252, I set the encoding as you said but Intellij keep encoding it in utf-8
Of course you need to specify the encoding you need in the JSP, just tried and it works:
I did that, sorry if I was unclear
The encoding indicator in the bottom right indicates utf-8 and the charset in the jsp header is windows-1252
Please contact support at https://intellij-support.jetbrains.com/hc/requests/new and attach a sample project to reproduce the issue.
Make sure you do not override the encoding in the IDE settings for this file.