Language specific files.encoding isn't always used #103110
Labels
*duplicate
Issue identified as a duplicate of another issue(s)
file-encoding
File encoding type issues
Issue Type: Bug
When using a language specific
files.encoding
, VSCode doesn't always use this encoding to open files.I have a settings.json that contains this config (Baan is a programming language; custom extension):
If I manually start VSCode - not opening any files or workspaces, just opening an empty instance - and then open a Baan file, that file is loaded in the correct encoding, Windows-1252.
If I start VSCode with a Baan file directly (double klicking on a source file, or passing a file path on the command line), the opened file is loaded in the default encoding, UTF-8, which is incorrect.
If I open any other file or workspace with VSCode and then open a Baan file, the encoding is correct again, Windows-1252.
I could reproduce this issue on a coworkers machine with his VSCode and with a different language (C in this case). The behavior is exactly the same. The only extension we both share is the Microsoft C# extension, so I assume this problem can be reproduced without any extensions.
VS Code version: Code 1.47.2 (17299e4, 2020-07-16T14:30:29.392Z)
OS version: Windows_NT ia32 10.0.18362
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Extensions (32)
(14 theme extensions excluded)
The text was updated successfully, but these errors were encountered: