proposal: extending .desktop files syntax to aid i18n


 Currently, there is no way of specifying which charset the 'name' and
'comment' fields of .desktop file are in. It leads to a lot of problems for
people with languages that have several encodings (all cyrillic languages -
russian, ukrainian  for example) since it's impossible to tell which encoding
the following 'name' string is in:


 One of the solutions could be using entries for a given language and any
charset it can be encoding in as subscript, e.g.:

name[ru.koi8-r]=TheName in koi8-r encoding
name[ru.cp1251]=TheName in cp1251 encoding
name[ru.utf8]=TheName in utf8 encoding
 That leads to bloat, and also breaks a lot of other utilities that generate
menu for various windowmanagers/environments based on the .desktop files.
 The problem is compilcated by the fact, that KDE2 menus use utf8 encoding for
'name' and 'comment' fields - this means that KDE2 menus are a mess in
Gnome menu under locale with encoding different from utf8 for any non-latin1

 I propose to introduce the following field: 'charset' - to .desktop file
format. It, when subscripted by language name, specifies the charset the
'name' and 'comment' are specified in. E.g., the former example could be
written in the following way using 'charset' field:

	Name[ru]=TheName in koi8-r encoding
	Comment[ru]=Comment to the TheName in koi8-r encoding

 Such introduction won't break already existing programs, and seems to be

 If 'charset' field is not specified for some language, then it's assumed that
'name' and 'comment' fields needn't recoding to any charset (e.g. they are in 

 What do you thing about this?
 If you think it's a good idea, then KDE people should be informed about this
 Best regards,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]