Skip to content

Support setting encoding from extension #251188

@TheCrether

Description

@TheCrether

It is great that with 1.100 the encoding API is finalized. I wanted to use it for an extension I am developing but I could not find a "simple" way to set the encoding of an open editor.

For files that are on disk, I am able to just use window.openTextDocument with the same URI and change the encoding through this.

For untitled files this is not possible, since I can't "reopen" an untitled file with it's URI. Would it be possible to introduce a general way to set the encoding of an editor? (IMO this also makes more sense)

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugfile-encodingFile encoding type issuesinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeededworkbench-untitled-editorsManaging of untitled editors in workbench window

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions