The dillo patch from http://teki.jpn.ph/pc/software/index-e.shtml fails sometimes. For me under solaris a core a runtime error occures with the following output: ---------------------------- ** WARNING **: no support enc Bus Error (core dumped) ---------------------------- To avoid the error, insert code from line 432-435 a_I18n_convert_raw() before line 455 a_I18n_convert(). So the return value of iconv_open() is checked and if it is not set do the iconv_open() again with defaults like in a_I18n_convert_raw(): gchar *a_I18n_convert( const gchar* from, const gchar* to, const gchar* buf, gint bufsize) { iconv_t it; gchar *outBuf; gint len; if (!buf) return NULL; if (bufsize == 0) return g_strdup(""); g_return_val_if_fail(from && to, g_strndup(buf, bufsize)); it = iconv_open(to, from); if (!it || it==(iconv_t)-1) { /* <========== start of insertion */ it = iconv_open("ASCII", DILLO_CHARSET); } /* =============== end of insertion */ len = (bufsize == -1) ? (gint)strlen(buf) : bufsize; if (len < 0) { MSG("a_I18n_convert: bufsize < 0\n"); return g_strdup(buf); } outBuf = a_I18n_convert_raw(it, buf, len); iconv_close(it); return outBuf; }
participants (1)
-
Christian Holland