GNOME Bugzilla – Bug 577877
Add a feature to set default character encoding
Last modified: 2009-04-05 13:02:12 UTC
gnome-terminal does not allow setting a default character encoding. This patch allows expert users to set the default encoding with gconf tool. Existing users are not affected by applying this patch. Other information:
Created attachment 132030 [details] [review] Default character encoding patch
That belongs to bug 108711; please attach further patches there. Quick review of the patch: +/* + * Set default character encoding, if one is set. One can set the default + * by editing + * /apps/gnome-terminal/profiles/Default/default_encoding with gconf + */ +static void +terminal_screen_encoding(VteTerminal *terminal) +{ + GConfClient *conf; + gchar *charset; + + conf = gconf_client_get_default (); + charset = gconf_client_get_string (conf, CONF_PROFILES_PREFIX"/Default/default_encoding", NULL); + if (charset != NULL) + vte_terminal_set_encoding (terminal, charset); + g_object_unref(conf); + g_free(charset); +} This is not how this should be implemented. The setting belongs in TerminalProfile, and TerminalScreen should only observe it. And when doing so, you need to take bug 108711 comment 2 into account. *** This bug has been marked as a duplicate of 108711 ***
I'm not sure what you mean, and I have to admit I'm not familiar with the code either. Could you be so kind and implement the feature in a proper way? Would it take too much effort?
I mean that the patch is doing it wrongly. Profile specific settings code belongs in TerminalProfile only, and TerminalScreen adapts to these settings. It wouldn't be very much effort to implement this for someone familiar with the code base.