Wednesday 1 May 2019

Change the encoding of a file in Visual Studio Code

Apart from the settings explained in the answer by @DarkNeuron:



"files.encoding": "any encoding"


you can also specify settings for a specific language like so:



"[language id]": {
"files.encoding": "any encoding"

}


For example, I use this when I need to edit PowerShell files previously created with ISE (which are created in ANSI format):



"[powershell]": {
"files.encoding": "windows1252"
}



You can get a list of identifiers of well-known languages here.

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...