Revision: 7139
          http://svn.sourceforge.net/mahogany/?rev=7139&view=rev
Author:   vadz
Date:     2006-10-19 17:22:12 -0700 (Thu, 19 Oct 2006)

Log Message:
-----------
use wxConvUTF8 instead of cclient functions for UTF-7 conversion whose 
interface has changed in the latest version

Modified Paths:
--------------
    trunk/M/src/gui/wxFolderTree.cpp

Modified: trunk/M/src/gui/wxFolderTree.cpp
===================================================================
--- trunk/M/src/gui/wxFolderTree.cpp    2006-10-20 00:20:40 UTC (rev 7138)
+++ trunk/M/src/gui/wxFolderTree.cpp    2006-10-20 00:22:12 UTC (rev 7139)
@@ -1702,38 +1702,11 @@
          if ( !isValid )
             break;
 
-         // valid IMAP modified UTF-7 mailbox name, converting to
-         // environment's default encoding for now (FIXME)
-
-         //Convert UTF-7 to UTF-8. Instead of this we could just use
-         //wxString(nameutf7.wc_str(wxConvUTF7), wxConvLocal);
-         //but wxWindows does not support UTF-7 yet, so we first convert
-         //UTF-7 to UTF-8 using c-client function and then convert
-         //UTF-8 to current environment's encoding.
-
-         nameutf7 << _T("-");
-
-         SIZEDTEXT *text7 = new SIZEDTEXT;
-         SIZEDTEXT *text8 = new SIZEDTEXT;
-         text7->data = (unsigned char *) nameutf7.c_str();
-         text7->size = nameutf7.Length();
-
-         utf8_text_utf7 (text7, text8);
-
-         //we cannot use "nameutf8 << text8->data" here as utf8_text_utf7()
-         //returns text8->data which is longer than text8->size:
-         String nameutf8;
-         nameutf8.reserve(text8->size);
-         for ( unsigned long k = 0; k < text8->size; k++ )
-         {
-            nameutf8 << wxChar(text8->data[k]);
-         }
-         // convert nameutf8 from UTF-8 to current environment's encoding:
-         nameutf8 = wxString(nameutf8.wc_str(wxConvUTF8), wxConvLocal);
-         name << nameutf8;
          i = j;
-         free(text7);
-         free(text8);
+
+         // valid IMAP modified UTF-7 mailbox name, convert to the encoding
+         // used by the GUI
+         name << wxString(nameutf7.wc_str(wxConvUTF7), *wxConvUI);
       }
       else // s != '&'
       {


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to