zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.42k stars 1.16k forks source link

How can I switch the text charset? #3169

Open paolosezart opened 4 months ago

paolosezart commented 4 months ago

How can I set the encoding when saving and/or opening text files? How is this done, for example, in the Notepad3 program: 09-03-2024

I have read the documentation and did not find an option to choose in which encoding I want to save the file. And most importantly, how to switch the text charset in an already opened file? Thanks!

AndrewDDavis commented 3 months ago

It looks like this is done using the encoding setting. You would use the set command to change the setting permanently, or setlocal to change it for only the current file. E.g. setlocal encoding "utf-8". Details here.