[BZ#744113] Recent files handling should handle non-filesystem file encodings
Submitted by Kai Willadsen
Link to original bug (#744113)
Description
As it stands, the recent files handling assumes that filenames can be round-tripped to and from the file system encoding, which is sadly very incorrect, and that therefore it's fine to store file names as UTF-8 encoded bytes.
This works about 99.5% of the time, and then it breaks. When it breaks, it doesn't actually take out anything... you just can't open the recent comparison. As such, this isn't as drastically awful as it would otherwise be.
For anyone interested in looking at this, we need to store the actual filename bytes in the recent comparison file, and be very paranoid about receiving Python unicodes as filenames, since it's almost certainly going to happen.