When I'm trying to open an ascii text file that has a few corrupt characters, Mousepad refuses to open the file and insists that the user select the correct character encoding. The desired behavior (used by many other text editors) is to open the slightly corrupt file for editing and display a special symbol where the characters have not been recognized using the current character encoding. A warning stating the character encoding was not recognized would be helpful but should not prevent Mousepad from working.
The "The document was not UTF-8 valid" dialog have options to select what encoding you want to open the file with but it seems no matter what is selected the OK button is always disabled. There is a big text area below "Invalid byte sequence in conversion input" but this text area seems to always be empty. So i am guessing that something fails when Mousepad tries to show something in the text area and that the OK button is not enabled until the text area is filled. Maybe Mousepad needs something else to be installed that is not installed? Like some converter software. But i think i would just prefer Mousepad to display the file. It would be annoying to have to select encoding each time you open a file. Just open the file and let the user see the file.
Is it possible the files are not text files and contain embedded NUL (0) bytes? If you want to attach a file that triggers this, I could have a look in a hex file viewer.
I tried opening mo files. Can be found in /usr/share/locale/[LL]/LC_MESSAGES If Mousepad is suppose to fail/not open mo files and other files like that i guess its ok but i often like to open such files in a text editor to find a string.
As far as I know Mousepad only supports opening text files right now. It might be possible to make it read other types of files and display them specially, but it might not fit well with Mousepad being a simple text editor. There are some nice hex editors for Linux which will no doubt open those files and even allow viewing and editing the strings in them.
I guess i would like to open files with the default applications not having to install extra stuff. Even if the content is not shown correctly. I tried opening a none UTF-8 text file and now the OK button is enable if i select something i Other:. Maybe the error message could be improved and somehow tell the user why the application is refusing to open the file. "Invalid byte sequence in conversion input" and disabled OK button does not really tell me why the program will not open the file. If the title of the dialog is document is not valid UTF-8 then it sounds like the application is only made for opening UTF-8 encoded files. So maybe all the text in the dialog could be written better like maybe unknown encoding or unable to detect encoding?
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/apps/mousepad/-/issues/28. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev