Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language specific files.encoding isn't always used #103110

Closed
haudan opened this issue Jul 22, 2020 · 2 comments
Closed

Language specific files.encoding isn't always used #103110

haudan opened this issue Jul 22, 2020 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) file-encoding File encoding type issues

Comments

@haudan
Copy link

haudan commented Jul 22, 2020

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):

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

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
Item Value
CPUs Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz (4 x 2808)
GPU Status 2d_canvas: enabled
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
Load (avg) undefined
Memory (System) 7.86GB (1.70GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (32)
Extension Author (truncated) Version
language-x86-64-assembly 13x 2.3.0
Bookmarks ale 11.3.1
theme-verdandi be5 2.0.1
better-toml bun 0.3.2
baan dan 1.0.0
xml Dot 2.5.1
vscode-wasm dts 1.3.1
vsc-material-theme Equ 32.8.0
vsc-material-theme-icons equ 1.2.0
plantuml jeb 2.13.12
theme-karyfoundation-themes kar 20.0.3
rust-analyzer mat 0.2.248
Lisp mat 0.1.10
vscode-language-pack-de MS- 1.47.3
remote-containers ms- 0.128.0
remote-ssh ms- 0.51.0
remote-ssh-edit ms- 0.51.0
remote-ssh-explorer ms- 0.51.0
remote-wsl ms- 0.44.4
vscode-remote-extensionpack ms- 0.20.0
hexeditor ms- 1.1.0
vsliveshare ms- 1.0.2478
debugger-for-chrome msj 4.12.9
rust rus 0.7.8
shader sle 1.1.4
vba spe 1.6.2
code-ca65 tlg 1.2.1
tmlanguage Tog 0.9.0
vscode-todo-highlight way 1.0.4
better-align wwm 1.1.6
clang-format xav 1.9.0
material-theme zhu 3.8.5

(14 theme extensions excluded)

@bpasero bpasero added the file-encoding File encoding type issues label Aug 12, 2020
@bpasero
Copy link
Member

bpasero commented Aug 12, 2020

/duplicate #39084

@github-actions github-actions bot locked and limited conversation to collaborators Sep 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) file-encoding File encoding type issues
Projects
None yet
Development

No branches or pull requests

3 participants
@bpasero @haudan and others