Closed Yurunsoft closed 9 months ago
Fix some encoding problems
python:
import locale; import sys; print(locale.getdefaultlocale()) print(locale.getpreferredencoding()) print(sys.getdefaultencoding()) print(sys.getfilesystemencoding())
php:
$locale = PyCore::import('locale'); $sys = PyCore::import('sys'); var_dump((string) $locale->getdefaultlocale()); var_dump((string) $locale->getpreferredencoding()); var_dump((string) $sys->getdefaultencoding()); var_dump((string) $sys->getfilesystemencoding());
需提供参考的技术文档
Python >= 3.8 对 Py_InitializeEx() 做了改动,参考文档:https://docs.python.org/3/c-api/init_config.html
Py_InitializeEx()
Fix some encoding problems
python:
php: