Trash spec: wrapping up

David Faure dfaure at trolltech.com
Fri Oct 29 21:37:09 EEST 2004


On Tuesday 26 October 2004 11:46, Alexander Larsson wrote:
> I still think that we must store the actual byte-string in the file, as
> opposed to converting it to some other encoding. However, it would be
> nice if the text file was still valid UTF8, and it needs to be able to
> contain all sorts of files, including those with newlines in the name.
> 
> Thus, i propose that we store the byte string in escaped form in the
> trash info file. The normal desktop file escaping method doesn't allow
> encoding of any byte value, so we can't use that. To avoid multiple
> escape/unescape problems when using existing desktop parsers we
> shouldn't extend that method. Instead i propose that we use url-style
> escaping. 

So we would have (for a french-like e+accent)
Path=%E8.txt
if the filesystem uses latin1, and
Path=%C3%A9.txt
if the filesystem uses utf8?

OK, this makes the whole .trashinfo file pure ASCII, even.
I'm not sure how that helps, though. After un-escaping you're back to the
same situation (e.g. a filename that is potentially invalid in the current locale)

And the name of the .trashinfo file itself would still contain the special char
(one or two of them, depending on the encoding being used)...

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the xdg mailing list