After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 96744 - Escaped keys are not unescaped
Escaped keys are not unescaped
Status: RESOLVED WONTFIX
Product: gconf-editor
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Gconf Editor Maintainers
GNOME Terminal Maintainers
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2002-10-24 20:15 UTC by Hidetoshi Tajima
Modified: 2018-07-01 08:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
garbled gnome-terminal profile (26.17 KB, image/gif)
2002-10-24 20:44 UTC, Hidetoshi Tajima
  Details
unescape gconf key for GUI and escape it again for gconf_client (3.80 KB, patch)
2002-11-07 01:00 UTC, Hidetoshi Tajima
needs-work Details | Review

Description Hidetoshi Tajima 2002-10-24 20:15:31 UTC
gnome-terminal or gconf, I'm not sure, but filing
gnome-terminal as it's the module the problem can
be produced from.

Run a gnome-terminal in ja_JP.eucJP locale, and create
a new profile with a Japanese name, and save.

cd to $(HOME)/.gconf/apps/gnome-terminal/profiles,
a directory like
 @4294967267@@4294967169@@4294967170@
has been created.

Run a gconf-editor, and go to apps->gnome-terminal->profile, this @4294..
appears.
Comment 1 Havoc Pennington 2002-10-24 20:33:41 UTC
The profile name still appears correctly in the GUI, right?
The user-displayed profile name is stored separately.

gconf keys can't be UTF-8, they are just an ASCII subset. 
The profile name there is what happens if you feed UTF-8 
to gconf_escape_key().

I think if we changed the gconf_escape_key() format it would probably 
be an incompatible change, so though the format is a little bit 
silly, I don't think we really want to change it.
Comment 2 Hidetoshi Tajima 2002-10-24 20:40:14 UTC
Yes, the profile name appears properly in 
gnome-terminal GUI.

But in gconf-editor, it shows a garbled folder 
name, which does not look quite nice.

Attaching a snapshot...
Comment 3 Hidetoshi Tajima 2002-10-24 20:44:43 UTC
Created attachment 11813 [details]
garbled gnome-terminal profile
Comment 4 Hidetoshi Tajima 2002-10-24 20:50:02 UTC
Can gconf-editor restore a UTF-8 name back
from the gconf_escape_key() format, then?
Comment 5 Havoc Pennington 2002-10-24 22:52:56 UTC
Hmm, interesting question. gconf-editor could maybe take a guess. 
There's no way to know whether a key is escaped or not though.
Comment 6 Hidetoshi Tajima 2002-10-24 23:39:30 UTC
mmm... Then, can gconf-editor replace a holder 
name with any likely-visible gconf key entry
when one can be found?

But, I'm asking this without knowing if
 - gtk treeview has such handler or not
 - such gconf key entry is always possible
   or not [if only gnome-terminal, "visible_name"
   could be used, but wishing if any generic one...]

Please advise...



 



Comment 7 Hidetoshi Tajima 2002-11-07 00:59:41 UTC
Havoc, 

Using gconf_unescape_key() when putting a new node
into gtk_tree and gconf_escape_key() when calling gconf_client seems
to fix the problem.
A patch will be attached shortly.

Will you please review the patch?
Comment 8 Hidetoshi Tajima 2002-11-07 01:00:50 UTC
Created attachment 12110 [details] [review]
unescape gconf key for GUI and escape it again for gconf_client
Comment 9 Hidetoshi Tajima 2002-11-07 01:02:30 UTC
And changing product to gconf-editor.
Comment 10 Havoc Pennington 2002-11-07 01:05:19 UTC
Anders is really the right person to review, this is his code.
Comment 11 Hidetoshi Tajima 2002-11-13 19:40:42 UTC
Anders, okay to commit to the HEAD?
Comment 12 Glynn Foster 2003-07-02 15:50:04 UTC
anders, wake up ;)
Comment 13 Kjartan Maraas 2003-10-30 22:28:40 UTC
Could someone please look at this patch?
Comment 14 alexander.winston 2004-01-21 06:37:58 UTC
Someone should really CC Anders on this one.

The patch still applies cleanly.
Comment 15 Anders Carlsson 2004-01-21 07:22:42 UTC
Committed
Comment 16 Fernando Herrera 2004-03-31 00:45:55 UTC
This patch breaks tow things:
* keys with "@" inside (bug #135807)
* keys with "." inside (bug #136400)

So I'm going to revert it and maybe we should try another patch for unescaping
keys with only "@" and numbers.
Comment 17 Fernando Herrera 2004-04-12 10:25:29 UTC
Rverted now. I'll let the bug opened until we have a sane way to unescape keys
(gconf_client_key_is_escaped new gconf function?)
Comment 18 Fernando Herrera 2004-04-26 11:52:26 UTC
Comment on attachment 12110 [details] [review]
unescape gconf key for GUI and escape it again for gconf_client

This patch will need more work, like doing some heuristics to guess if the key
should be tried to escape
Comment 19 André Klapper 2018-07-01 08:39:35 UTC
gconf-editor is not under active development anymore and has not seen code changes for six years. 
Its codebase has been archived: https://gitlab.gnome.org/Archive/gconf-editor/commits/master

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.