Revision: 7413
http://mahogany.svn.sourceforge.net/mahogany/?rev=7413&view=rev
Author: vadz
Date: 2008-04-12 19:16:54 -0700 (Sat, 12 Apr 2008)
Log Message:
-----------
use From8BitData() instead of (implicitly) using system locale when saving data
to a string as old behaviour could result in data corruption and even crash
(because of conversion failure) when restoring data with To8BitData() later
Modified Paths:
--------------
trunk/M/src/mail/SendMessageCC.cpp
Modified: trunk/M/src/mail/SendMessageCC.cpp
===================================================================
--- trunk/M/src/mail/SendMessageCC.cpp 2008-04-13 02:06:48 UTC (rev 7412)
+++ trunk/M/src/mail/SendMessageCC.cpp 2008-04-13 02:16:54 UTC (rev 7413)
@@ -1916,7 +1916,7 @@
static long write_stream_output(void *stream, char *string)
{
ostream *o = (ostream *)stream;
- *o << string;
+ *o << wxString::From8BitData(string).ToUTF8().data();
if ( o->fail() )
return NIL;
@@ -1927,7 +1927,8 @@
static long write_str_output(void *stream, char *string)
{
String *o = (String *)stream;
- *o << string;
+ o->append(wxString::From8BitData(string));
+
return 1;
}
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 the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates