Search code examples
character-encodingasp-classicvisual-studio-code

vscode: set encoding for files with a specific extension


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.


Solution

  • 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"