Paul J. Lucas has proposed merging lp:~zorba-coders/zorba/new-base64-api-email 
into lp:zorba/email-module.

Commit message:
Using the new Base64 API.

Requested reviews:
  Paul J. Lucas (paul-lucas)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/new-base64-api-email/+merge/177673

Using the new Base64 API.
-- 
https://code.launchpad.net/~zorba-coders/zorba/new-base64-api-email/+merge/177673
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.
=== modified file 'src/com/zorba-xquery/www/modules/email/imap.xq.src/imap_function.cpp'
--- src/com/zorba-xquery/www/modules/email/imap.xq.src/imap_function.cpp	2013-06-12 13:36:28 +0000
+++ src/com/zorba-xquery/www/modules/email/imap.xq.src/imap_function.cpp	2013-07-30 19:14:25 +0000
@@ -927,9 +927,9 @@
     aEncoding = ENC8BIT;
     if (!isTextOrXMLContentType(aContentType)) {
       // binary content needs to be base64 encoded for zorba
-      zorba::String lInput(aResult.c_str());
-      zorba::String lOutput = zorba::base64::encode(lInput);
-      aResult = lOutput.c_str();
+      std::string lOutput;
+      zorba::base64::encode(aResult, &lOutput);
+      aResult = lOutput;
     }
   }
   else if (aEncoding == ENCBASE64) {

=== modified file 'src/com/zorba-xquery/www/modules/email/smtp.xq.src/mime_handler.cpp'
--- src/com/zorba-xquery/www/modules/email/smtp.xq.src/mime_handler.cpp	2013-06-12 13:36:28 +0000
+++ src/com/zorba-xquery/www/modules/email/smtp.xq.src/mime_handler.cpp	2013-07-30 19:14:25 +0000
@@ -85,7 +85,8 @@
     // if string contains non-ascii chars, we encode it with
     // base64 encoding and generate a header value according to
     // http://tools.ietf.org/html/rfc2047 (MIME encoded-word syntax).
-    zorba::String lEncodedValue = zorba::base64::encode(aString);
+    zorba::String lEncodedValue;
+    zorba::base64::encode(aString, &lEncodedValue);
     zorba::String lFullValue = zorba::String("=?UTF-8?B?") 
                              + lEncodedValue 
                              + zorba::String("?=");

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to