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

Auto encoding file - magic words in file #145310

Closed
AdamL67 opened this issue Mar 17, 2022 · 6 comments
Closed

Auto encoding file - magic words in file #145310

AdamL67 opened this issue Mar 17, 2022 · 6 comments
Labels
feature-request Request for new features or functionality file-encoding File encoding type issues

Comments

@AdamL67
Copy link

AdamL67 commented Mar 17, 2022

Issue Type: Feature Request

Can you enter the auto detect encoding file using a "magic word" in file,
e.g. at the beginning in the comment I write "VSCODE.ENCODING=cp852"

batch
REM VSCODE.ENCODING=cp852
ECHO ...
...
javascript
// VSCODE.ENCODING=windows1250
def Func() ...
...
SQL
-- VSCODE.ENCODING=utf8
SELECT ...

XML
<-- VSCODE.ENCODING=cp437 -->
...

VS Code version: Code 1.65.2 (c722ca6, 2022-03-10T14:33:55.248Z)
OS version: Windows_NT x64 10.0.19044
Restricted Mode: No

@jrieken jrieken assigned bpasero and unassigned jrieken Mar 17, 2022
@bpasero bpasero added file-encoding File encoding type issues feature-request Request for new features or functionality labels Mar 17, 2022
@bpasero
Copy link
Member

bpasero commented Mar 17, 2022

Prior: #36230

@bpasero bpasero added this to the Backlog Candidates milestone Mar 17, 2022
@bpasero bpasero removed their assignment Mar 17, 2022
@AdamL67

This comment was marked as abuse.

@ams-tschoening
Copy link

Two examples how difficult this might become:

batch
REM VSCODE.ENCODING=cp852

I'm using :: as comments in my Windows batch files, because that is far easier to read.

XML
<-- VSCODE.ENCODING=cp437 -->

Many XML files already have an explicit character encoding documented in them. So it should be preferred to read otherwise already available pieces of information and especially support for XML has been asked for some years ago already.

In my opinion, the focus should be on supporting charset for EditorConfig and/or supporting file extension based configs. Those features are far more flexible, one doesn't need to deal with different textual file formats etc.

@VSCodeTriageBot
Copy link
Collaborator

🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@github-actions github-actions bot locked and limited conversation to collaborators Jul 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality file-encoding File encoding type issues
Projects
None yet
Development

No branches or pull requests

6 participants
@bpasero @jrieken @ams-tschoening @AdamL67 @VSCodeTriageBot and others