阅读背景:

如果字符串中有非ASCII字符,如何将C字符串(char数组)转换为Python字符串?

来源:互联网 

I have embedded a Python interpreter in a C program. Suppose the C program reads some bytes from a file into a char array and learns (somehow) that the bytes represent text with a certain encoding (e.g., ISO 8859-1, Windows-1252, or UTF-8). How do I decode the contents of this char array into a Python string?I have embedded a Python interpreter in a C pro




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: