GNOME Bugzilla – Bug 164795
Gedit shall point at bad characters when loading/saving a file with a specific encoding
Last modified: 2014-08-11 20:35:46 UTC
I'm trying to edit a log file that is encoded into EUCJS Japanese encoding. I select the proper encoding in the Open file dialog, and then Gedit tells me that I don't have the proper encoding and stops there. It's annoying because it doesn't tell me where in the file the problem is... It would be nice that Gedit open the file anyway, and point at (like, highlight) the problematic parts of the text, so that the user can fix them and then the file could be saved properly. Currently, to compare, Kwrite can open that kind of file, but it will refuse to save it. (I still don't know where the problem is...)
The same kind of feature would be helpful for saving files... If you insert only one "bad" character in a huge file, it will refuse to save and won't tell you where the character is...
Nice idea. I think we could behave like KWrite but pointing the user to the problematic point in the text if the number of errors are small. In the case the number of errors is big we could suggest to open the file with an hex editor as suggested by another bug report.
*** Bug 324610 has been marked as a duplicate of this bug. ***
Still valid in 3.2
*** Bug 615106 has been marked as a duplicate of this bug. ***
*** Bug 641460 has been marked as a duplicate of this bug. ***
Invalid characters are highlighted with a red background color, and are displayed with their corresponding hexadecimal values.