You are not logged in.
Pages: 1
Hi!
It seems like that once a file has been opened, there is no obvious way to change the encoding.
Suppose that I'm opening a file with some foreign encoding such as GBK or SHIFT-JIS, and accidentally chose the wrong encoding in the "Select Encoding" window, and being presented with garbled text. There is no obvious way fix the situation.
Just close the editor and re-open the file won't help since encoding is remembered along with file history in GtkRecentManager.
By purging the "Recent Files" history, theoretically the user would be given a second chance to choose the right encoding. However, if the problematic file is now opened in the editor, deleting recent files history would have no effect, since the history would automatically be filled again with the current file upon exit, of course, with the wrong encoding infomation.
Thus the only way I've found to reset the current file's encoding is:
- Close the editor
- Open another file
- Purge recent history
- Close the editor
- Open the problematic file, and make sure to choose the corrent encoding this time.
I think there should be an menu item to change encoding on the fly.
Thanks!
Last edited by PCNet3000 (2023-09-24 11:37:34)
Offline
There are two ways to change the encoding when opening the file:
* via the command line;
* via the encoding box in the open dialog (bottom left).
In particular,
mousepad -e -- file
opens `file` in the encoding dialog.
Last edited by Tamaranch (2023-09-27 16:50:38)
Offline
Pages: 1
[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 520.32 KiB (Peak: 530.3 KiB) ]