2005-10-22 [colin] 1.9.15cvs92
authorColin Leroy <colin@colino.net>
Sat, 22 Oct 2005 14:00:49 +0000 (14:00 +0000)
committerColin Leroy <colin@colino.net>
Sat, 22 Oct 2005 14:00:49 +0000 (14:00 +0000)
* src/codeconv.c
try to convert using locale (apart utf8) if necessary

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/codeconv.c

index 71881649d643848b6209debd69f861026fdb734c..9a9f53ba44ac2bf906faf69cbeda2474f96c47a6 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-22 [colin]     1.9.15cvs92
+
+       * src/codeconv.c
+               try to convert using locale (apart utf8) if necessary
+
 2005-10-22 [colin]     1.9.15cvs91
 
        * src/pixmaps/new.xpm
 2005-10-22 [colin]     1.9.15cvs91
 
        * src/pixmaps/new.xpm
index 903644d6c490c8ba7f7ec008ceda9503e6415c28..f8c3ea727a3c0b7f1bd152c1dea957dc8842fac6 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.59.2.25 -r 1.59.2.26 src/prefs_filtering.c;  cvs diff -u -r 1.96.2.81 -r 1.96.2.82 src/textview.c;  cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/plugins/pgpinline/pgpinline.c;  ) > 1.9.15cvs89.patchset
 ( cvs diff -u -r 1.382.2.186 -r 1.382.2.187 src/compose.c;  ) > 1.9.15cvs90.patchset
 ( cvs diff -u -r 1.2.16.1 -r 1.2.16.2 src/pixmaps/new.xpm;  cvs diff -u -r 1.2.16.2 -r 1.2.16.3 src/pixmaps/unread.xpm;  ) > 1.9.15cvs91.patchset
 ( cvs diff -u -r 1.59.2.25 -r 1.59.2.26 src/prefs_filtering.c;  cvs diff -u -r 1.96.2.81 -r 1.96.2.82 src/textview.c;  cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/plugins/pgpinline/pgpinline.c;  ) > 1.9.15cvs89.patchset
 ( cvs diff -u -r 1.382.2.186 -r 1.382.2.187 src/compose.c;  ) > 1.9.15cvs90.patchset
 ( cvs diff -u -r 1.2.16.1 -r 1.2.16.2 src/pixmaps/new.xpm;  cvs diff -u -r 1.2.16.2 -r 1.2.16.3 src/pixmaps/unread.xpm;  ) > 1.9.15cvs91.patchset
+( cvs diff -u -r 1.65.2.41 -r 1.65.2.42 src/codeconv.c;  ) > 1.9.15cvs92.patchset
index 18c663cd2b5654201904aca04d9a6123c7bca05c..0d77ed211d835767803f8d21cee56c48e0b29d1e 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=91
+EXTRA_VERSION=92
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index d1226ee3590e6923619cc0dea58e3b29f803e4bf..e3a9a834aa616c55e7d93a98ba092bb3adee1372 100644 (file)
@@ -677,14 +677,25 @@ void conv_localetodisp(gchar *outbuf, gint outlen, const gchar *inbuf)
 {
        gchar *tmpstr;
 
 {
        gchar *tmpstr;
 
+       codeconv_set_strict(TRUE);
        tmpstr = conv_iconv_strdup(inbuf, conv_get_locale_charset_str(),
                                   CS_INTERNAL);
        tmpstr = conv_iconv_strdup(inbuf, conv_get_locale_charset_str(),
                                   CS_INTERNAL);
+       codeconv_set_strict(FALSE);
        if (tmpstr && g_utf8_validate(tmpstr, -1, NULL)) {
                strncpy2(outbuf, tmpstr, outlen);
                g_free(tmpstr);
        if (tmpstr && g_utf8_validate(tmpstr, -1, NULL)) {
                strncpy2(outbuf, tmpstr, outlen);
                g_free(tmpstr);
+               return;
        } else if (tmpstr && !g_utf8_validate(tmpstr, -1, NULL)) {
                g_free(tmpstr);
        } else if (tmpstr && !g_utf8_validate(tmpstr, -1, NULL)) {
                g_free(tmpstr);
-               conv_utf8todisp(outbuf, outlen, inbuf);
+               codeconv_set_strict(TRUE);
+               tmpstr = conv_iconv_strdup(inbuf, 
+                               conv_get_locale_charset_str_no_utf8(),
+                               CS_INTERNAL);
+               codeconv_set_strict(FALSE);
+       }
+       if (tmpstr && g_utf8_validate(tmpstr, -1, NULL)) {
+               strncpy2(outbuf, tmpstr, outlen);
+               g_free(tmpstr);
        } else
                conv_utf8todisp(outbuf, outlen, inbuf);
 }
        } else
                conv_utf8todisp(outbuf, outlen, inbuf);
 }