sync with 0.8.10cvs21
authorPaul Mangan <paul@claws-mail.org>
Mon, 3 Mar 2003 06:19:52 +0000 (06:19 +0000)
committerPaul Mangan <paul@claws-mail.org>
Mon, 3 Mar 2003 06:19:52 +0000 (06:19 +0000)
ChangeLog
ChangeLog.claws
ChangeLog.jp
configure.ac
src/codeconv.c

index 803fed396c716cef3df9735faa4f58a321b92d98..e4bbb9a3df305b8e227e9e97dbf2e2d5c2e67a4b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2003-03-03
+
+       * src/codeconv.c: fixed UTF-8 locale support.
+         conv_get_code_conv_func(): return conv_noconv if locale encoding
+         is UTF-8. Return conv_latintodisp on ISO-8859-* to locale encoding
+         conversion.
+         conv_convert(): call conv_iconv_strdup() instead of
+         conv_codeset_strdup().
+         conv_codeset_strdup(): moved some codes into conv_iconv_strdup().
+
 2003-02-28
 
        * src/prefs_account.[ch]: added an option to use command output for
index 406d35d6994bb3d23938af8854855900f310bcf1..e41d578161e481b8121cc6dcb60d182457d5421e 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-03 [paul]      0.8.10claws72
+
+       * sync with 0.8.10cvs21
+               see ChangeLog 2003-03-03
+
 2003-03-02 [christoph] 0.8.10claws71
 
        * src/common/passcrypt.c
index 8c60fe617e99fce19df5a673fe2863105df08370..f3c610897eb11248331ffc7d9c3a61b716986984 100644 (file)
@@ -1,3 +1,13 @@
+2003-03-03
+
+       * src/codeconv.c: UTF-8 locale Âбþ¤ò½¤Àµ¡£
+         conv_get_code_conv_func(): locale ¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤¬ UTF-8 ¤Î
+         ¾ì¹ç¤Ï conv_noconv ¤òÊÖ¤¹¤è¤¦¤Ë¤·¤¿¡£ ISO-8859-* ¤«¤é locale
+         ¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°¤Ø¤ÎÊÑ´¹¤Î¾ì¹ç¤Ï conv_latintodisp ¤òÊÖ¤¹¤è¤¦¤Ë¤·¤¿¡£
+         conv_convert(): conv_codeset_strdup() ¤ÎÂå¤ï¤ê¤Ë conv_iconv_strdup()
+         ¤ò¸Æ¤Ö¤è¤¦¤Ë¤·¤¿¡£
+         conv_codeset_strdup(): °ìÉô¤Î¥³¡¼¥É¤ò conv_iconv_strdup() ¤Ë°ÜÆ°¡£
+
 2003-02-28
 
        * src/prefs_account.[ch]: ½ð̾¤Ë¥³¥Þ¥ó¥É¤Î½ÐÎϤò»ÈÍѤ¹¤ë¥ª¥×¥·¥ç¥ó
index 7c114841ca9064a752757bd40d3f30e10adb18fc..718effa051efafa2dcac2dc0b3f2ec113be9a219 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws71
+EXTRA_VERSION=claws72
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 00d278814794417e8b85da9bc1f152a8e30d8c47..db8ec79c8439a0fbef8cc1a6c1c3fc078b0edd8b 100644 (file)
@@ -664,7 +664,7 @@ gint conv_convert(CodeConverter *conv, gchar *outbuf, gint outlen,
        else {
                gchar *str;
 
-               str = conv_codeset_strdup(inbuf, conv->charset_str, NULL);
+               str = conv_iconv_strdup(inbuf, conv->charset_str, NULL);
                if (!str)
                        return -1;
                else {
@@ -697,19 +697,6 @@ gchar *conv_codeset_strdup(const gchar *inbuf,
        }
 
 #if HAVE_ICONV
-       if (!src_code)
-               src_code = conv_get_outgoing_charset_str();
-       if (!dest_code)
-               dest_code = conv_get_current_charset_str();
-
-       /* don't convert if current codeset is US-ASCII */
-       if (!strcasecmp(dest_code, CS_US_ASCII))
-               return g_strdup(inbuf);
-
-       /* don't convert if src and dest codeset are identical */
-       if (!strcasecmp(src_code, dest_code))
-               return g_strdup(inbuf);
-
        return conv_iconv_strdup(inbuf, src_code, dest_code);
 #else
        return g_strdup(inbuf);
@@ -740,6 +727,10 @@ CodeConvFunc conv_get_code_conv_func(const gchar *src_charset_str,
 
        if (dest_charset == C_US_ASCII)
                return conv_ustodisp;
+       else if (dest_charset == C_UTF_8 ||
+                (dest_charset == C_AUTO &&
+                 conv_get_current_charset() == C_UTF_8))
+               return conv_noconv;
 
        switch (src_charset) {
        case C_ISO_2022_JP:
@@ -754,7 +745,6 @@ CodeConvFunc conv_get_code_conv_func(const gchar *src_charset_str,
                        code_conv = conv_ustodisp;
                break;
        case C_ISO_8859_1:
-#if !HAVE_ICONV
        case C_ISO_8859_2:
        case C_ISO_8859_4:
        case C_ISO_8859_5:
@@ -764,7 +754,6 @@ CodeConvFunc conv_get_code_conv_func(const gchar *src_charset_str,
        case C_ISO_8859_11:
        case C_ISO_8859_13:
        case C_ISO_8859_15:
-#endif
                if (dest_charset == C_AUTO)
                        code_conv = conv_latintodisp;
                break;
@@ -802,6 +791,19 @@ gchar *conv_iconv_strdup(const gchar *inbuf,
        gint out_left;
        gint n_conv;
 
+       if (!src_code)
+               src_code = conv_get_outgoing_charset_str();
+       if (!dest_code)
+               dest_code = conv_get_current_charset_str();
+
+       /* don't convert if current codeset is US-ASCII */
+       if (!strcasecmp(dest_code, CS_US_ASCII))
+               return g_strdup(inbuf);
+
+       /* don't convert if src and dest codeset are identical */
+       if (!strcasecmp(src_code, dest_code))
+               return g_strdup(inbuf);
+
        cd = iconv_open(dest_code, src_code);
        if (cd == (iconv_t)-1)
                return NULL;