Re: addresses from balsa-ab are not encoded properly
- From: Peter Bloomfield <peterbloomfield bellsouth net>
- To: balsa-list gnome org
- Subject: Re: addresses from balsa-ab are not encoded properly
- Date: Thu, 20 Aug 2009 08:52:32 -0400
Hi Ildar:
On 08/20/2009 06:03:20 AM Thu, Ildar Mulyukov wrote:
On 20.08.2009 00:56:28, Peter Bloomfield wrote:
... But when you and I get different results from the same set of
actions, I'm still mystified!
The attached patch dumps the To: address in hex when the message is
created in the out-box or draft-box. Could you try it? It may offer
some clue as to what the difference is.
libbalsa_message_create_mime_message name "Бальса-лист", hex: d0 91 d0
b0 d0 bb d1 8c d1 81 d0 b0 2d d0 bb d0 b8 d1 81 d1 82
libbalsa_message_create_mime_message address "balsa-list gnome org",
hex: 62 61 6c 73 61 2d 6c 69 73 74 40 67 6e 6f 6d 65 2e 6f 72 67
As exected.
Was that typed or pasted? And did it result in an encoded name in the
draft-box, or not?
Regards, Ildar
P.S. BTW, unfortunately your patch segfaults balsa in many cases.
Ouch--yes, it just hit me, too! More careful patch attached.
Thanks for the testing!
Peter
diff --git a/libbalsa/send.c b/libbalsa/send.c
index 79d8d0f..1c9dba1 100644
--- a/libbalsa/send.c
+++ b/libbalsa/send.c
@@ -1901,6 +1901,47 @@ libbalsa_message_create_mime_message(LibBalsaMessage* message, gboolean flow,
recipients = g_mime_message_get_recipients(mime_message,
GMIME_RECIPIENT_TYPE_TO);
+
+{ /* begin debug */
+ guint i, len;
+ if (message->headers->to_list
+ && (len =
+ internet_address_list_length(message->headers->to_list) > 0)) {
+ for (i = 0; i < len; i++) {
+ InternetAddress *ia =
+ internet_address_list_get_address(message->
+ headers->to_list, i);
+ const gchar *name, *addr;
+ if (INTERNET_ADDRESS_IS_GROUP(ia)) {
+ g_print("%s skipping group %s\n", __func__,
+ internet_address_get_name(ia));
+ continue;
+ }
+ name = internet_address_get_name(ia);
+ g_print("%s name \"%s\", hex:", __func__, name);
+ if (name) {
+ while (*name) {
+ g_print(" %c", "0123456789abcdef"[(*name >> 4) & 0x0f]);
+ g_print("%c", "0123456789abcdef"[(*name) & 0x0f]);
+ ++name;
+ }
+ }
+ g_print("\n");
+ addr =
+ internet_address_mailbox_get_addr(INTERNET_ADDRESS_MAILBOX(ia));
+ g_print("%s address \"%s\", hex:", __func__, addr);
+ if (addr) {
+ while (*addr) {
+ g_print(" %c", "0123456789abcdef"[(*addr >> 4) & 0x0f]);
+ g_print("%c", "0123456789abcdef"[(*addr) & 0x0f]);
+ ++addr;
+ }
+ }
+ g_print("\n");
+ }
+ }
+} /* end debug */
+
internet_address_list_append(recipients, message->headers->to_list);
recipients = g_mime_message_get_recipients(mime_message,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]