+++ /dev/null
---- poldek-0.20.1-cvs20070108.22/pkgu.c.stare 2007-05-29 21:40:39.000000000 +0200
-+++ poldek-0.20.1-cvs20070108.22/pkgu.c 2007-05-30 16:37:16.000000000 +0200
-@@ -15,6 +15,8 @@
- */
-
- #include <ctype.h>
-+#include <iconv.h>
-+#include <langinfo.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-@@ -576,7 +576,27 @@
- return 0;
- description = n_buf_it_getz(it, &dlen);
-
-- inf = pkguinf_i18n_new(pkgu->_na, summary, description);
-+ if (strstr(lang, "UTF-8")) {
-+ iconv_t cd;
-+ size_t u_slen = slen, u_dlen = dlen;
-+ char *new_s, *new_d;
-+ char *summary_utf8 = n_malloc(u_slen + 1);
-+ char *description_utf8 = n_malloc(u_dlen + 1);
-+
-+ new_s = summary_utf8;
-+ new_d = description_utf8;
-+ cd = iconv_open(nl_langinfo(CODESET), "UTF-8");
-+ iconv(cd, &summary, &slen, &new_s, &u_slen);
-+ iconv(cd, &description, &dlen, &new_d, &u_dlen);
-+ iconv_close(cd);
-+ *new_s = '\0';
-+ *new_d = '\0';
-+ inf = pkguinf_i18n_new(pkgu->_na, summary_utf8, description_utf8);
-+ n_free(summary_utf8);
-+ n_free(description_utf8);
-+ } else {
-+ inf = pkguinf_i18n_new(pkgu->_na, summary, description);
-+ }
- n_hash_insert(pkgu->_ht, lang, inf);
-
- pkgu->summary = inf->summary;