** See bug #300891
authorChangwoo Ryu <cwryu@debian.org>
Tue, 9 Aug 2005 05:44:19 +0000 (05:44 +0000)
committerMichael Zucci <zucchi@src.gnome.org>
Tue, 9 Aug 2005 05:44:19 +0000 (05:44 +0000)
2005-04-17  Changwoo Ryu  <cwryu@debian.org>

        ** See bug #300891

        * Makefile.am (INCLUDES): define CAMEL_EXPLICIT_TRANSLATION_DOMAIN
        and EVOLUTION_LOCALEDIR.

        * camel.c (camel_init): initialize gettext with bindtextdomain()
        and bind_textdomain_codeset().

2005-08-09  Changwoo Ryu <cwryu@debian.org>

        ** See bug #300115.

        * camel-mime-utils.c (rfc2047_encode_word): if the last unicode
        character in the input string is non-ASCII, it is always encoded
        as a separated chunk.

camel/ChangeLog
camel/Makefile.am
camel/camel-mime-utils.c
camel/camel.c

index 60d607e..903eddf 100644 (file)
@@ -1,3 +1,21 @@
+2005-04-17  Changwoo Ryu  <cwryu@debian.org>
+
+       ** See bug #300891
+       
+       * Makefile.am (INCLUDES): define CAMEL_EXPLICIT_TRANSLATION_DOMAIN
+       and EVOLUTION_LOCALEDIR.
+
+       * camel.c (camel_init): initialize gettext with bindtextdomain()
+       and bind_textdomain_codeset().
+
+2005-08-09  Changwoo Ryu <cwryu@debian.org>
+
+       ** See bug #300115.
+
+       * camel-mime-utils.c (rfc2047_encode_word): if the last unicode
+       character in the input string is non-ASCII, it is always encoded
+       as a separated chunk.
+
 2005-08-08  Not Zed  <NotZed@Ximian.com>
 
        ** See bug #312831.
index 60bdec7..373712a 100644 (file)
@@ -22,6 +22,8 @@ INCLUDES = -I.. -I$(srcdir)/..                                \
        -DCAMEL_LIBEXECDIR=\""$(camellibexecdir)"\"     \
        -DCAMEL_PROVIDERDIR=\""$(camel_providerdir)"\"  \
        -DG_LOG_DOMAIN=\"camel\"                        \
+       -DCAMEL_EXPLICIT_TRANSLATION_DOMAIN=\"$(GETTEXT_PACKAGE)\"      \
+       -DEVOLUTION_LOCALEDIR=\""$(localedir)"\"        \
        $(CAMEL_CFLAGS)
 
 libcamel_provider_1_2_la_SOURCES =             \
index f7d81b3..0dde705 100644 (file)
@@ -1316,7 +1316,7 @@ rfc2047_encode_word(GString *outstring, const char *in, size_t len, const char *
                        /* proclen will be the result of input characters that we can convert, to the nearest
                           (approximated) valid utf8 char */
                        convlen = 0;
-                       proclen = 0;
+                       proclen = -1;
                        p = inptr;
                        i = 0;
                        while (p < (in+len) && convlen < (75 - strlen("=?utf-8?q\?\?="))) {
@@ -1332,8 +1332,10 @@ rfc2047_encode_word(GString *outstring, const char *in, size_t len, const char *
                                else
                                        convlen += 3;
                        }
+                       if (proclen >= 0 && proclen < i && convlen < (75 - strlen("=?utf-8?q\?\?=")))
+                               proclen = i;
                        /* well, we probably have broken utf8, just copy it anyway what the heck */
-                       if (proclen == 0) {
+                       if (proclen == -1) {
                                w(g_warning("Appear to have truncated utf8 sequence"));
                                proclen = inlen;
                        }
index ef040c2..ae0056a 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "camel.h"
 #include "camel-certdb.h"
+#include "camel-i18n.h"
 #include "camel-mime-utils.h"
 #include "camel-provider.h"
 #include "camel-debug.h"
@@ -75,6 +76,9 @@ camel_init (const char *configdir, gboolean nss_init)
        if (initialised)
                return 0;
 
+       bindtextdomain (GETTEXT_PACKAGE, EVOLUTION_LOCALEDIR);
+       bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+
        camel_debug_init();
 
        /* initialise global camel_object_type */