+ if (encoding) {
+ char *pspell_encoding;
+ pspell_encoding = convert_to_pspell_encoding (encoding);
+ debug_print(_("Pspell encoding: %s\n"), pspell_encoding);
+ pspell_config_replace(gtkpspell->config, "encoding", (const char *)pspell_encoding);
+ if (pspell_config_error_number(gtkpspell->config) !=0 ) {
+ debug_print(_("Pspell encoding: %s\n"), pspell_config_error_message(gtkpspell->config));
+ debug_print(_("Pspell encoding: setting error. Switching to iso8859-1 (sorry)\n"));
+ pspell_config_replace(gtkpspell->config, "encoding", "iso8859-1");
+ }
+ g_free(pspell_encoding);
+ }