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' setting not applied when opening a file 'directly' #45636

Closed
haudan opened this issue Mar 13, 2018 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@haudan
Copy link

haudan commented Mar 13, 2018

Issue Type: Bug

Example settings

"[c]": {
    "editor.tabSize": 2,
    "files.encoding": "windows1252",
},

Problem

✅ When launching vscode and then opening a .c file with the File -> Open File dialogue, the files.encoding setting is correctly applied to the opened buffer.

❌ When double clicking on a .c file (assuming .c files are associated with vscode), or opening a .c file via the context menu (Open with Code), or when invoking vscode on the command line with a filename as it's only argument, the files.encoding setting is not applied to the buffer.

editor.tabSize on the other hand, is always correctly applied.


This problem is not specific to the file type / programming language / language extension. I use C just as an example here.

VS Code version: Code 1.21.0 (9a199d7, 2018-03-07T11:04:09.886Z)
OS version: Windows_NT ia32 10.0.15063

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6600U CPU @ 2.60GHz (4 x 2808)
Memory (System) 7.87GB (4.41GB free)
Process Argv C:\Program Files (x86)\Microsoft VS Code\Code.exe
Screen Reader no
VM 0%
Extensions (12)
Extension Author (truncated) Version
language-x86-64-assembly 13x 2.2.11
Bookmarks ale 0.18.2
theme-verdandi be5 1.7.3
better-toml bun 0.3.2
baan dan 0.0.1
vsc-material-theme Equ 1.5.1
macros ged 1.2.1
vscode-icons rob 7.21.0
rust rus 0.4.0
vscode-hexdump sle 1.6.0
vscode-todo-highlight way 0.5.11
better-align wwm 1.1.6

(10 theme extensions excluded)

Reproduces without extensions
@haudan
Copy link
Author

haudan commented Mar 13, 2018

This is possibly a duplicate of #39084. Maybe my error description helps, so I'll leave the issue open.

@bpasero bpasero added the *duplicate Issue identified as a duplicate of another issue(s) label Mar 13, 2018
@vscodebot
Copy link

vscodebot bot commented Mar 13, 2018

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for existing issues here. See also our issue reporting guidelines.

Happy Coding!

@vscodebot vscodebot bot closed this as completed Mar 13, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Apr 27, 2018
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)
Projects
None yet
Development

No branches or pull requests

2 participants