Add support for ISO-8859-1 (Latin-1) encoding – open, edit, and save #55599
davidfcopozo
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What are you proposing?
Add native support for opening, editing, and saving files encoded in ISO-8859-1 (Latin-1), including the ability to switch to this encoding from the status bar or command palette.
Why does this matter?
ISO-8859-1 is one of the most widely used legacy encodings in Western European languages (Spanish, French, German, Portuguese, Italian, etc.). Without support for it, Zed is unable to correctly open a large number of real-world files, making it impractical for anyone working with:
Currently, Zed throws an error or displays garbled characters when encountering these files, forcing users to convert them externally just to open them.
Are there any examples or context?
VS Code handles this gracefully with two dedicated commands:
Reopen with Encoding— interprets the current file bytes using a selected encodingSave with Encoding— writes the file back using the chosen encodingBoth are accessible from the command palette and the status bar, making the workflow intuitive.
Sublime Text and Notepad++ also support encoding switching from the status bar or menu, and can auto-detect encoding on file open.
Possible approach
buffer: reopen with encodingandbuffer: save with encoding, similar to VS Code.encoding_rs(already common in the Rust ecosystem) to handle the encoding/decoding layer.Beta Was this translation helpful? Give feedback.
All reactions