diff --git a/lib/strutil/strutil.c b/lib/strutil/strutil.c
index e887a3f..90faa37 100644
a
|
b
|
GIConv str_cnv_to_term; |
70 | 70 | GIConv str_cnv_from_term; |
71 | 71 | GIConv str_cnv_not_convert = INVALID_CONV; |
72 | 72 | |
| 73 | static void |
| 74 | str_iconv_init (GIConv coder) |
| 75 | { |
| 76 | gchar *obuf = NULL; |
| 77 | gsize oleft = 0; |
| 78 | |
| 79 | /* Some systems (it seems Solaris 11.1) don't allow NULL outbuf */ |
| 80 | g_iconv (coder, NULL, NULL, &obuf, &oleft); |
| 81 | } |
| 82 | |
73 | 83 | /* if enc is same encoding like on terminal */ |
74 | 84 | static int |
75 | 85 | str_test_not_convert (const char *enc) |
… |
… |
_str_convert (GIConv coder, const char *string, int size, GString * buffer) |
129 | 139 | } |
130 | 140 | |
131 | 141 | left = size; |
132 | | g_iconv (coder, NULL, NULL, NULL, NULL); |
| 142 | str_iconv_init (coder); |
133 | 143 | |
134 | 144 | while (left != 0) |
135 | 145 | { |
… |
… |
str_translate_char (GIConv conv, const char *keys, size_t ch_size, char *output, |
290 | 300 | size_t left; |
291 | 301 | size_t cnv; |
292 | 302 | |
293 | | g_iconv (conv, NULL, NULL, NULL, NULL); |
| 303 | str_iconv_init (conv); |
294 | 304 | |
295 | 305 | left = (ch_size == (size_t) (-1)) ? strlen (keys) : ch_size; |
296 | 306 | |