[evolution-mapi] Bug #569321 - Message list strings are missing some symbols
- From: Milan Crha <mcrha src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution-mapi] Bug #569321 - Message list strings are missing some symbols
- Date: Fri, 15 Jan 2010 17:03:19 +0000 (UTC)
commit fa612170e6abcf6ee398b2865d7fa0f0fb03a7bc
Author: Milan Crha <mcrha redhat com>
Date: Fri Jan 15 18:00:52 2010 +0100
Bug #569321 - Message list strings are missing some symbols
src/camel/camel-mapi-folder.c | 6 ++++++
src/libexchangemapi/exchange-mapi-connection.c | 2 +-
src/libexchangemapi/exchange-mapi-utils.c | 17 +++++++++++++++++
3 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/src/camel/camel-mapi-folder.c b/src/camel/camel-mapi-folder.c
index d57e855..acb72ae 100644
--- a/src/camel/camel-mapi-folder.c
+++ b/src/camel/camel-mapi-folder.c
@@ -995,15 +995,21 @@ mapi_refresh_folder(CamelFolder *folder, CamelException *ex)
PR_MESSAGE_DELIVERY_TIME,
PR_MESSAGE_FLAGS,
PR_SENT_REPRESENTING_NAME,
+ PR_SENT_REPRESENTING_NAME_UNICODE,
PR_SENT_REPRESENTING_EMAIL_ADDRESS,
+ PR_SENT_REPRESENTING_EMAIL_ADDRESS_UNICODE,
PR_SENT_REPRESENTING_ADDRTYPE,
+ PR_SENT_REPRESENTING_ADDRTYPE_UNICODE,
PR_LAST_MODIFICATION_TIME,
PR_INTERNET_MESSAGE_ID,
PR_INTERNET_REFERENCES,
PR_IN_REPLY_TO_ID,
PR_DISPLAY_TO,
+ PR_DISPLAY_TO_UNICODE,
PR_DISPLAY_CC,
+ PR_DISPLAY_CC_UNICODE,
PR_DISPLAY_BCC,
+ PR_DISPLAY_BCC_UNICODE,
PR_TRANSPORT_MESSAGE_HEADERS,
PR_TRANSPORT_MESSAGE_HEADERS_UNICODE
};
diff --git a/src/libexchangemapi/exchange-mapi-connection.c b/src/libexchangemapi/exchange-mapi-connection.c
index 76ad8b9..28ee2c2 100644
--- a/src/libexchangemapi/exchange-mapi-connection.c
+++ b/src/libexchangemapi/exchange-mapi-connection.c
@@ -1127,7 +1127,7 @@ exchange_mapi_connection_fetch_items (mapi_id_t fid,
}
/* Get a handle on the container */
- retval = GetContentsTable(&obj_folder, &obj_table, 0, NULL);
+ retval = GetContentsTable(&obj_folder, &obj_table, TableFlags_UseUnicode, NULL);
if (retval != MAPI_E_SUCCESS) {
mapi_errstr("GetContentsTable", GetLastError());
goto cleanup;
diff --git a/src/libexchangemapi/exchange-mapi-utils.c b/src/libexchangemapi/exchange-mapi-utils.c
index fa5a054..3a91e1f 100644
--- a/src/libexchangemapi/exchange-mapi-utils.c
+++ b/src/libexchangemapi/exchange-mapi-utils.c
@@ -46,9 +46,26 @@ utf8tolinux (const char *wstring)
{
TALLOC_CTX *mem_ctx;
gchar *newstr, *retval = NULL;
+ gint i;
+ gboolean all_ok = TRUE;
g_return_val_if_fail (wstring != NULL, NULL);
+ /* If all letters are with code <128 then there is nothing
+ to be converted, thus return the original string copy.
+ It's not working always, but should be fine for now.
+
+ This is a temporary hack before the windows_to_utf8 will
+ be fixed to not drop some letters.
+ */
+ for (i = 0; all_ok && wstring[i]; i++) {
+ /* signed char, thus '> 128' means '< 0' */
+ all_ok = wstring[i] > 0;
+ }
+
+ if (all_ok)
+ return g_strdup (wstring);
+
mem_ctx = talloc_init ("ExchangeMAPI_utf8tolinux");
newstr = windows_to_utf8(mem_ctx, wstring);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]