Skip to content
Permalink
Browse files
initialize embedded python to UTF-8 mode only with Python >=3.8 (foll…
…owup 61c7973)
  • Loading branch information
jef-n committed Jun 25, 2021
1 parent 4d27183 commit 65676da81619249f479e6e932aa64ba756d4deca
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/python/qgspythonutilsimpl.cpp
@@ -162,6 +162,7 @@ bool QgsPythonUtilsImpl::checkSystemImports()

void QgsPythonUtilsImpl::init()
{
#if defined(PY_MAJOR_VERSION) && defined(PY_MINOR_VERSION) && ((PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 8) || PY_MAJOR_VERSION > 3)
PyStatus status;
PyPreConfig preconfig;
PyPreConfig_InitPythonConfig( &preconfig );
@@ -173,6 +174,7 @@ void QgsPythonUtilsImpl::init()
{
Py_ExitStatusException( status );
}
#endif

// initialize python
Py_Initialize();

0 comments on commit 65676da

Please sign in to comment.