Detected wrong encoding and so saved [$50]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Scratch |
Fix Released
|
High
|
Robert Roth |
Bug Description
Hi,
there's a critical (as it corrupts data) bug in Scratch. I have documents in Central European (WIN-1250) encoding. Scratch detects wrong encoding of this files while opening. There are some russian chars instead of czech ones. And as I change only one char in opened document, it is saved in that wrong encoding. And because there are not backups created on save, and autosave is activated in default state, it's very easy to lost correct version of document.
Maybe it's hard to detect right encoding or there is a problem in some related library, because some other editors (gedit...) detect wrong encoding too. But gedit has no autosave and also I can select right encoding in open file dialog.
Also sometimes Scratch opens empty file, when it's not in Latin-1 encoding.
Scratch isn't usable for me in this situations, so I'm forced to use gedit.
---
For testing, I created correct WIN-1250 document with some czech characters. It's in attachment. There's also screenshot showing how it should look.
Related branches
- elementary Apps team: Pending requested
-
Diff: 115 lines (+24/-20)3 files modifiedplugins/folder-manager/FileView.vala (+20/-16)
plugins/folder-manager/FolderManagerPlugin.vala (+2/-2)
src/Services/Encoding.vala (+2/-2)
Changed in scratch: | |
status: | New → Confirmed |
importance: | Undecided → High |
milestone: | none → 1.2 |
Changed in scratch: | |
milestone: | 2.0 → 2.1 |
Changed in scratch: | |
milestone: | 2.0.1 → 2.1 |
Changed in scratch: | |
status: | Confirmed → In Progress |
Changed in scratch: | |
status: | Incomplete → Confirmed |
Changed in scratch: | |
assignee: | nobody → Robert Roth (evfool) |
status: | Confirmed → In Progress |
Changed in scratch: | |
status: | In Progress → Fix Committed |
Changed in scratch: | |
status: | Fix Committed → Fix Released |
It's even worse than I thought. As I found out, file with wrong encoding is saved by Scratch immediately after opening. I don't have to write even a single char and file is saved. So the file data are already destroyed when you view it only. Look at next attachments.