Skip to content
Permalink
Browse files
Allow python plugin's metadata in unicode.
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@9663 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Nov 18, 2008
1 parent 6753b48 commit 83678fcafc0ee492d62859a9d2acf60826bd0b59
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 83678fc

Please sign in to comment.