Menu spec: .desktop filename encoding issue
markmc at redhat.com
Wed Jul 20 19:03:09 EEST 2005
This gnome-menus bug:
brought up an interesting problem.
If a .desktop filename is encoded using some unknown charset then
the filename is essentially junk (i.e. you can't reliably convert it to
a known encoding).
This could cause problems if you later try to use filename as a
desktop-file-id in a .menu file since the filename would not be valid in
the encoding of the .menu file.
I guess an implementation has two choices:
1) When writing .menu files, escape the desktop-file-id such that it
is valid in the encoding of the file and unescape it when parsing.
2) Just completely ignore .desktop files whose filenames use some
We should recommend a course of action in the specification. The
problem with doing (1) is that it changes the semantics of the
<Filename> tag. I've made gnome-menus do (2) for now - since its such a
corner case, it seems like a reasonable course to take?
 - e.g. the filename is encoded in ISO-8859-15 and the locale's
charset is UTF-8
More information about the xdg