SF.net SVN: mahogany:[7571] trunk/M/src/Python/PythonHelp.cpp
[email protected] Tue, 21 Jul 2009 00:30:57 +0000
| Newsgroups | gmane.mail.mahogany.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 7571
http://mahogany.svn.sourceforge.net/mahogany/?rev=7571&view=rev
Author: vadz
Date: 2009-07-21 00:30:57 +0000 (Tue, 21 Jul 2009)
Log Message:
-----------
Correctly decode strings returned by Python functions from UTF-8.
Modified Paths:
--------------
trunk/M/src/Python/PythonHelp.cpp
Modified: trunk/M/src/Python/PythonHelp.cpp
===================================================================
--- trunk/M/src/Python/PythonHelp.cpp 2009-07-21 00:23:14 UTC (rev 7570)
+++ trunk/M/src/Python/PythonHelp.cpp 2009-07-21 00:30:57 UTC (rev 7571)
@@ -293,7 +293,11 @@
if ( !value || PyArg_Parse(rc, "s", &p) )
{
if ( value )
- *value = p;
+ {
+ // just as we pass all strings to Python in UTF-8, assume that all
+ // returned strings are in UTF-8 too
+ *value = wxString::FromUTF8(p);
+ }
// everything ok, skip error messages below
return true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge