Revision: 7323
          http://mahogany.svn.sourceforge.net/mahogany/?rev=7323&view=rev
Author:   vadz
Date:     2007-08-20 14:59:32 -0700 (Mon, 20 Aug 2007)

Log Message:
-----------
fix headers encoding in Unicode build

Modified Paths:
--------------
    trunk/M/src/mail/SendMessageCC.cpp

Modified: trunk/M/src/mail/SendMessageCC.cpp
===================================================================
--- trunk/M/src/mail/SendMessageCC.cpp  2007-08-20 21:59:03 UTC (rev 7322)
+++ trunk/M/src/mail/SendMessageCC.cpp  2007-08-20 21:59:32 UTC (rev 7323)
@@ -759,7 +759,7 @@
 
    // get the encoding in RFC 2047 sense: choose the most reasonable one
    wxFontEncoding enc = m_encHeaders == wxFONTENCODING_SYSTEM
-                           ? wxFONTENCODING_ISO8859_1
+                           ? wxLocale::GetSystemEncoding()
                            : m_encHeaders;
 
    MimeEncoding enc2047 = GetMimeEncodingForFontEncoding(enc);
@@ -786,7 +786,11 @@
 
    // encode the header splitting it in the chunks such that they will be no
    // longer than 75 characters each
-   const wxChar *s = header.c_str();
+   //
+   // FIXME-Unicode: we shouldn't use a global encoding for headers any more,
+   //                we could mix different encoding inside the same header
+   const wxCharBuffer buf(header.mb_str(wxCSConv(enc)));
+   const char *s = buf;
    while ( *s )
    {
       // if this is not the first line, insert a line break


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to