Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-09-24 11:29:08

PCNet3000
Member
Registered: 2023-09-24
Posts: 2

No obvious way to change encoding in MousePad

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

#2 2023-09-27 16:49:44

Tamaranch
Member
Registered: 2020-12-31
Posts: 273

Re: No obvious way to change encoding in MousePad

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

Board footer

Powered by FluxBB