-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Git diff ignores language configured encoding #48038
Comments
I did some quick research, seems the diff command creates a URI of scheme git and other of type file (for current one) Editor instance is considering user setting language encoding only for file schemes; therefore git scheme is being rendered with default configuration. Later I'll try to PR on this. |
@vlopes11 Are you currently working on this? I am looking to get started with the project and would like to maybe tackle this as my first issue? |
@mkavidas That would be amazing! I'm quite short on available time so you could fully dive into this. As a tip, seems like the resourceEditorInput class don't have getEncoding and setEncoding methods implemented. diffEditorInput will instantiate this class for original EditorInput and fileEditorInput for modified one in this bug example If these methods exists, seems like standard Editor creation will use them to process the encoding. |
@vlopes11 thanks for the help. I've been trying to just figure out how the code works/ how to fix it. I first tried to make resourceEditorInput implement IEncodingSupport then I added the necessary getEncoding and setEncoding methods. It seems that despite the methods being there they are never called. Did you mean to modify the constructor to add a "preferredEncoding" argument? It also thought this might be the culprit: https://github.com/Microsoft/vscode/blob/8578f0241e1a64fb5af8ee1b030e42579ef9cd6f/src/vs/workbench/services/editor/common/editorService.ts#L329 And while it is true that resourceInput.encoding is undefined, even if I hard code it to be 'windows1252' it has no effect. I feel like I might be missing something so any advice you can give me would be greatly appreciated! I'm mostly curious on how the resourceEditorInput grabs the default files.encoding (while ignoring the language specific). I think if I can find where that happens I could add some logic to grab the correct encoding. |
Is there any progress? |
I would like to take care of this issue, but I'm new to this project, so any help would be appreciated. |
Version 1.22.2
Commit 3aeede7
Date 2018-04-12T16:38:45.278Z
Shell 1.7.12
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
Steps to Reproduce:
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: