1

I'm working with visual studio code to edit classic asp pages.

In order not to break everything, I need .asp files to be read and written using Windows 1252 encoding.

Is there some way to configure it? if it could be done on a folder/project/workspace basis that would be great.

user692942
  • 15,667
  • 7
  • 74
  • 164
opensas
  • 56,632
  • 72
  • 237
  • 363
  • Why not just [read the documentation](https://code.visualstudio.com/docs/getstarted/settings)? The in-built settings editor even has a search feature, just type "encoding" will be enough to show you examples of defining encoding by file type. – user692942 Mar 06 '19 at 22:47

1 Answers1

13

See language-specific settings. so something like

 "[asp]": {
    "files.encoding": "windows1252"
  },

assuming asp is your language name, if not, put your language there.

If you want it for only a specific workspace put that into that workspace settings.

Command palette/"Open Workspace Settings"

Mark
  • 97,651
  • 19
  • 297
  • 324
  • Pretty much [answer here](https://stackoverflow.com/a/49175432/692942) already. – user692942 Mar 07 '19 at 08:17
  • You are right - although that question started out about changing the encoding for a file, not a language or "an extension". So easy to miss. – Mark Mar 07 '19 at 14:51