Issue #18395, #22108: Update embedded Python examples to decode correctly

command line parameters: use Py_DecodeLocale() and PyUnicode_DecodeFSDefault().
This commit is contained in:
Victor Stinner 2014-08-01 12:28:49 +02:00
parent f6a271ae98
commit 25e014bd91
4 changed files with 40 additions and 9 deletions

View file

@ -13,7 +13,7 @@ main(int argc, char *argv[])
}
Py_Initialize();
pName = PyUnicode_FromString(argv[1]);
pName = PyUnicode_DecodeFSDefault(argv[1]);
/* Error checking of pName left out */
pModule = PyImport_Import(pName);