GNOME Bugzilla – Bug 135807
@-sign seems to truncate key names
Last modified: 2004-12-22 21:47:04 UTC
I am not sure whether the issue is with @-signs or the keys in general, but: /desktop/gnome/thumbnailers I have a bunch of keys that are (a) empty; and (b) truncated at the @-sign. This seems to be only an issue within gconf-editor: monkey@smacky:~% gconftool-2 --dump /desktop/gnome/thumbnailers|grep '<key>' <key>disable_all</key> <key>application@ogg/command</key> <key>application@ogg/enable</key> <key>application@vnd.rn-realmedia/command</key> <key>application@vnd.rn-realmedia/enable</key> <key>application@x-font-otf/command</key> <key>application@x-font-otf/enable</key> <key>application@x-font-pcf/command</key> <key>application@x-font-pcf/enable</key> <key>application@x-font-ttf/command</key> <key>application@x-font-ttf/enable</key> <key>application@x-font-type1/command</key>
Confirmed with gconf-editor 2.5.4 on Gentoo Linux aswell. Gconftool-2 indeed does not seem to have this problem.
Some additional information on this. GDB shows that the key name is fine when read with gconf_client_all_dirs() in gconf_tree_model_build_level() (gconf-tree-model.c). Later in the function gconf_unescape_key() is called, which does the truncation. Looking into gconf_unescape_key, the @-sign is used to escape. So the question is: is foo@bar even a valid key name? Should it be foo@064@, to respect the escaping done in gconf_escape_key? gconftool doesn't do any escaping when dumping, which is why it doesn't exhibit the problem. The patch for #96744 looks like it introduced this.
Yep, this is a real problem. UTF-8 keys are stored using @+number, so any key with @nonnumber will be wrongly escaped. We should ask first Havoc if keys non escaoed keys containing @ are allowed. If so, they only workaround I can figure should be only unscape the key when it contains only @ and numbers.
*** Bug 139457 has been marked as a duplicate of this bug. ***
Now we are not doing escaping (will do it in a sane way in the future) so this is now fixed.