Update of /cvsroot/mahogany/M/src/classes
In directory usw-pr-cvs1:/tmp/cvs-serv13094/src/classes

Modified Files:
        MessageView.cpp 
Log Message:
finished UTF-7 support

Index: MessageView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/classes/MessageView.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -b -u -2 -r1.78 -r1.79
--- MessageView.cpp     16 Apr 2002 13:37:18 -0000      1.78
+++ MessageView.cpp     16 Apr 2002 16:03:14 -0000      1.79
@@ -83,10 +83,4 @@
 #endif
 
-#include "Mcclient.h"
-extern "C"
-{
-   #include "utf8.h"  // for utf8_text_utf7()
-}
-
 // ----------------------------------------------------------------------------
 // options we use here
@@ -1150,8 +1144,8 @@
       if ( !EnsureAvailableTextEncoding(&encHeader, &value) )
       {
-         // special handling for the UTF-8 if it's not supported natively
-         if ( encHeader == wxFONTENCODING_UTF8 )
+         // special handling for the UTF-7|8 if it's not supported natively
+         if ( encHeader == wxFONTENCODING_UTF8 || encHeader == wxFONTENCODING_UTF7)
          {
-            encHeader = ConvertUnicodeToSystem(&value);
+            encHeader = ConvertUnicodeToSystem(&value, encHeader == 
+wxFONTENCODING_UTF7);
          }
       }
@@ -1243,11 +1237,11 @@
       encPart = mimepart->GetTextEncoding();
 
-      if ( encPart == wxFONTENCODING_UTF8 )
+      if ( encPart == wxFONTENCODING_UTF8 || encPart == wxFONTENCODING_UTF7)
       {
-         // convert from UTF-8 to environment's default encoding
-         encPart = ConvertUnicodeToSystem(&textPart);
+         // show UTF-8|7, not env. encoding in Language menu
+         m_encodingAuto = encPart;
 
-         // show UTF-8, not env. encoding in Language menu
-         m_encodingAuto = wxFONTENCODING_UTF8;
+         // convert from UTF-8|7 to environment's default encoding
+         encPart = ConvertUnicodeToSystem(&textPart, encPart == wxFONTENCODING_UTF7);
       }
       else if ( encPart == wxFONTENCODING_SYSTEM ||


_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to