Cannot load files whose path uses non-ASCII chars
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux Stopmotion |
Fix Released
|
Medium
|
Tim Band |
Bug Description
This is a duplicate of a very annoying bug I posted on Debian, see http://
Stopmotion can save files using any UTF-8 character in file names, but it cannot load them. The saved file appears with strange characters in the list of files recently used. Tests showed stopmotion also fails if any parent directory has such characters while file names are using pure ASCII chars. Trying to load such file gives the following error:
-------
I/O warning : failed to load external entity "(null)(null).dat"
Couldn't load XML file
error : string is not in UTF-8
encoding error : output conversion failed due to conv error, bytes 0xE9 0x2E 0x73 0x74
I/O error : encoder error
encoding error : output conversion failed due to conv error, bytes 0xE9 0x2E 0x73 0x74
I/O error : encoder error
encoding error : output conversion failed due to conv error, bytes 0xE9 0x2E 0x73 0x74
I/O error : encoder error
-------
As a result the file cannot be loaded anymore, you have to uncompress the STO file and change file names or directory paths in order to retrieve your work (example file attached). Note that trying to load such file also empties the configuration file $HOME/.
Finally note that I've started to look at the source code to determine how to fix the issue. In my opinion this is due to the extensive use of C strings instead of QStrings for file names. Unfortunately I'm discovering Qt and I feel that many source files have to be patched to remove C strings and lists of C strings in favour of Qt objects. The work is then harder than expected.
Changed in lsm: | |
status: | New → In Progress |
importance: | Undecided → Medium |
Changed in lsm: | |
status: | In Progress → Fix Committed |
Changed in lsm: | |
assignee: | nobody → Tim Band (tim-band) |
I have a patch for this (I will test it further then post it; it's not very impressive), but libtar is also bugged in a way that stops this from working (it writes out its checksums wrongly when a file has non-ASCII charcters in it). I will post my libtar patch to their mailing list (seems they have no bugtracker) and see how far I get. Oddly, the tar command-line tool can untar the files stopmotion produces... perhaps tar ignores broken checksums.