Skip to content
Permalink
Browse files

Allow python plugin's metadata in unicode.

git-svn-id: http://svn.osgeo.org/qgis/trunk@9663 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder
wonder committed Nov 18, 2008
1 parent 5b25e64 commit 4c5e48382e70cf67fe6fac04685243cc3eca161e
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/python/qgspythonutilsimpl.cpp
@@ -434,6 +434,15 @@ QString QgsPythonUtilsImpl::getPluginMetadata( QString pluginName, QString funct
PyErr_Clear();
retval = "__error__";
}
else if ( PyUnicode_Check( obj ) )
{
PyObject* utf8 = PyUnicode_AsUTF8String( obj );
if (utf8)
retval = QString::fromUtf8( PyString_AS_STRING( utf8 ) );
else
retval = "__error__";
Py_XDECREF( utf8 );
}
else if ( PyString_Check( obj ) )
{
retval = PyString_AS_STRING( obj );

0 comments on commit 4c5e483

Please sign in to comment.