Py_UNICODE
- Py_UNICODE is a typedef alias for either unsigned short (UCS2) or unsigned long (UCS4).
- UCS2 and UCS4 Python builds are not binary compatible.
To compile Python with UCS4,
./configure --enable-unicode=ucs4
make && make install
wchar_t
In Unix/Linux
wchar_t is unsigned long (32 bits, 4 bytes)
In Windows
wchar_t is unsigned short (16 bits, 2 bytes)
If you use wchar_t C/C++ in codes and when need to convert to Py_Unicode, your python need to be UCS4 binary.
Cheers,
၅၅ နှစ်ပြည့် မင်္ဂလာ ...
5 years ago
No comments:
Post a Comment