Trash spec 0.4

Waldo Bastian bastian at kde.org
Fri Sep 10 14:24:32 EEST 2004


On Thursday 09 September 2004 19:58, David Faure wrote:
> On Thursday 09 September 2004 19:29, Alexander Larsson wrote:
> > Surely there must be a byte-array type in Qt?
>
> Yes there is, of course, but it's not used for any file operations in Qt
> nor for any KIO (what you call VFS) operations in KDE. It's all QString
> (UCS-2) based.
>
> Anyway, that's out of the scope of the spec.
> I agree that the best solution is to write the filename "as is".

Indeed. 

Note that the encoding needed to decode to unicode (for the visual 
presentation) is determined by the original location of the file. E.g. if the 
path was /foo/bar/dir/file.txt then the encoding is the same encoding that 
you would use when listing the /foo/bar/dir directory. So you don't need to 
store additional encoding information in the .trashinfo file.

In particular you may get the encoding wrong, but in that case you will at 
least get it consistently wrong so that the filename in the original 
directory listing and the one in the trash listing will look the same.

Cheers,
Waldo
-- 
bastian at kde.org  |   Novell BrainShare Europe 2004   |  bastian at suse.com
bastian at kde.org  | 12-18 September, Barcelona, Spain |  bastian at suse.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20040910/13d24c35/attachment.pgp 


More information about the xdg mailing list