from ctypes import CDLL
c = CDLL("msvcrt.dll")
c.printf('a=%d'.encode(),1) #这样正确
c.printf('中国=%d'.encode(),1) # 这里不能正确显示 @: a 浜?1
#----------又如------------
int testFile(const char* filename); /* 打开文件进行一些操作(文件名可能含有中文字符) */
path = r"c:\中文测试.txt" #python 中
API.testFile(path.encode()) # 会出现打开文件出错提示