Revision: 7377
http://mahogany.svn.sourceforge.net/mahogany/?rev=7377&view=rev
Author: vadz
Date: 2007-09-20 05:10:33 -0700 (Thu, 20 Sep 2007)
Log Message:
-----------
decode the string returned from Address::GetName() too, just as we already do
for GetAddress(), and document this behaviour
Modified Paths:
--------------
trunk/M/include/Address.h
trunk/M/src/mail/AddressCC.cpp
Modified: trunk/M/include/Address.h
===================================================================
--- trunk/M/include/Address.h 2007-09-12 00:40:26 UTC (rev 7376)
+++ trunk/M/include/Address.h 2007-09-20 12:10:33 UTC (rev 7377)
@@ -38,8 +38,16 @@
// ----------------------------------------------------------------------------
/**
- Address class represents a single RFC 822 address. The RFC 822 groups are not
- (well) supported for the moment, i.e. the group information is lost.
+ Address class represents a single RFC 822 address.
+
+ Notice that the GetAddress() and GetName() methods of this class return
+ decoded addresses/names, i.e. they return Unicode strings and not 7 bit ASCII
+ MIME-encoded words. Thus, their return value is suitable for being displayed
+ in the UI but must be MIME-encoded if it needs to be included in a mail
+ message.
+
+ The RFC 822 groups are not (well) supported for the moment, i.e. the group
+ information is lost.
*/
class Address
{
Modified: trunk/M/src/mail/AddressCC.cpp
===================================================================
--- trunk/M/src/mail/AddressCC.cpp 2007-09-12 00:40:26 UTC (rev 7376)
+++ trunk/M/src/mail/AddressCC.cpp 2007-09-20 12:10:33 UTC (rev 7377)
@@ -102,7 +102,7 @@
personal = AdrField2String(m_adr->personal);
- return personal;
+ return MIME::DecodeHeader(personal);
}
String AddressCC::GetMailbox() const
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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates