Menu spec: .desktop filename encoding issue

Frederic Crozat fcrozat at
Wed Jul 20 19:23:25 EEST 2005

Le mercredi 20 juillet 2005 à 12:12 -0400, Daniel Veillard a écrit :
> On Wed, Jul 20, 2005 at 05:03:09PM +0100, Mark McLoughlin wrote:
> > 	If a .desktop filename is encoded using some unknown charset[1] then
> > the filename is essentially junk (i.e. you can't reliably convert it to
> > a known encoding).
>    XML solved that problem the following way:
>      - the file has an encoding (with UTF-8 and UTF-16 being the 
>        only default encoding, i.e. guessed/assumed if not indicated
>        in the instance)
>      - unknown encoding are fatal error the file can't be read
>      - if the file does not follow that encoding it's a fatal error
>        the file cannot be read
>     - never ever depend on a locale for processing 
> IMHO XML solved the problem for good that way. Making encoding errors 
> fatal also ensured that problems are detected immediately, not on the
> client in the majority of the cases.

The problem here is about the filename on disk, whose encoding can't be
guessed nor stored somewhere, unfortunately :(

I know I hit this problem with Menu specification because we were using
title from menu entry to autogenerate desktop filename (which was not a
problem until people started to type in french or chinese :(

Frederic Crozat <fcrozat at>

More information about the xdg mailing list