37,720
社区成员
发帖
与我相关
我的任务
分享
#include <Python.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
Py_Initialize();
//PyObject* pArgs = Py_BuildValue("(s)", "中文");
PyObject* pArgs = Py_BuildValue("(s)", "\xe4\xbd\xa0\xe5\xa5\xbd");
printf("%p\n", pArgs);
printf("%s\n", PyString_AsString(PyObject_Str(pArgs)));
Py_Finalize();
return 0;
}
02496050
('\xe4\xb8\xad\xe6\x96\x87',)