Trash spec: wrapping up
mclasen at redhat.com
Fri Oct 29 21:48:35 EEST 2004
On Fri, 2004-10-29 at 14:37, David Faure wrote:
> 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)
> if the filesystem uses latin1, and
> 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)...
What you win is that (the content, maybe not the name of) the .trashinfo
file itself is valid UTF-8, thus you can use existing parsers (eg for
the desktop entry spec) which expect to parse valid UTF-8
More information about the xdg