add encoding parameter to .as_std_string()

to handle PyUnicode Objects. Usually ASCII for object names and Utf-8
for file names and console output.
issue #995
This commit is contained in:
Sebastian Hoogen
2015-01-31 22:36:39 +01:00
committed by wmayer
parent 6a0bcfbaee
commit d2bb75566e
8 changed files with 31 additions and 31 deletions

View File

@@ -613,7 +613,7 @@ PyObject* Application::sAddWorkbenchHandler(PyObject * /*self*/, PyObject *args,
// Search for some methods and members without invoking them
Py::Callable(object.getAttr(std::string("Initialize")));
Py::Callable(object.getAttr(std::string("GetClassName")));
item = name.as_std_string();
item = name.as_std_string("ascii");
PyObject* wb = PyDict_GetItemString(Instance->_pcWorkbenchDictionary,item.c_str());
if (wb) {