1

I am using VS Code. I have a project where all the files are UTF-8. When I load the file in VS Code, it thinks it is ISO 8859-1 encoded. I can change the encoding using the option at the bottom to re-read with a different encoding, but I don't want to have to do this for every file. I want VS Code to enforce that all files are and remain UTF-8 encoded.

I go to preferences > settings > workspace tab and search for encoding. There it says UTF-8 and I have changed it from and to UTF-8 several times. But then, when I open a file, it still opens it as ISO 8859-1.

I don't know what to do. This setting should change it for all the pages in the repository, right? I am reading a .md markdown file. I am running on Windows. I would like to just set this one workspace because I have other workspaces in different encodings.

1 Answer 1

0

Well, I guess you have to shut down VSCode and restart it for this setting to take effect. At least that is what I did, and finally the setting took effect.

Maybe closing the project and reopening might have worked.

After I restarted, only then it appeared in the projects as ISO 8859-1 encoding. I changed it after the restart to UTF-8, and that stuck and worked. Maybe there is a display bug in VSCode that was preventing me from seeing / modifying the actual setting.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.