locale specific for .desktop
nicolas.mailhot at laposte.net
Tue Oct 9 23:58:41 PDT 2007
Le mardi 09 octobre 2007 à 17:10 -0400, Rodney Dawes a écrit :
> File name encoding is not guaranteed to be in a specific encoding. You
> can have file names in several encodings in the same directory on the
> same file system in Linux, at least with ext. If the user's encoding
> changes, and the file name encoding does not match that, or the system
> default, there's no guaranteed way to know what it is.
So what? You have a known encoding in the .desktop file, UTF-8. The
mapping from this encoding to the file system encoding is not
the .desktop responsibility, but the application responsibility. If
applications do not know the filesystem encoding, tough luck, mapping
won't work no matter what the .desktop encoding is.
Allowing non-UTF-8 strings in the .desktop file buys you nothing except
if you posit the user locale encoding is the same as the filesystem
encoding and don't want bothering converting UTF-8 on the fly to this
encoding. And then things will horribly break as soon as the user
examines a filesystem part written by someone else with another locale
(removable media, remote mounts, etc).
So the executive summary is:
1. if you know the filesystem encoding converting .desktop strings is
2. if you do not know the filesystem encoding things will break no
That's why distros like Fedora assume everything is UTF-8 and let
non-UTF-8 users mop up themselves instead of trying to second-guess
encoding choices and failing 20% of the time.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Ceci est une partie de message
Url : http://lists.freedesktop.org/archives/xdg/attachments/20071010/cfb4394a/attachment.pgp
More information about the xdg