Revision: 7381
http://mahogany.svn.sourceforge.net/mahogany/?rev=7381&view=rev
Author: vadz
Date: 2007-10-06 09:37:15 -0700 (Sat, 06 Oct 2007)
Log Message:
-----------
use UTF-8 instead of current encoding when passing strings to embedded Python
Modified Paths:
--------------
trunk/M/src/Python/PythonHelp.cpp
Modified: trunk/M/src/Python/PythonHelp.cpp
===================================================================
--- trunk/M/src/Python/PythonHelp.cpp 2007-10-06 16:16:47 UTC (rev 7380)
+++ trunk/M/src/Python/PythonHelp.cpp 2007-10-06 16:37:15 UTC (rev 7381)
@@ -45,9 +45,9 @@
#include "Mdefaults.h"
-// macro to pass a string to Python: not sure if it should use the current
-// locale encoding (as now) or UTF-8 or maybe wchar_t?
-#define PYTHON_STR(s) ((const char *)(s).mb_str())
+// macro to pass a string to Python (we could also use "u" format and pass
+// Unicode data directly but UTF-8 should work without problems too)
+#define PYTHON_STR(s) ((const char *)(s).utf8_str())
// ----------------------------------------------------------------------------
// options we use here
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