[Pyrex] [Cython] Python 3

Christian Heimes lists at cheimes.de
Wed Apr 30 01:16:33 CEST 2008


Greg Ewing schrieb:
> Thanks, I didn't know that.
> 
> So it seems that we could, if it were considered desirable,
> have an automatic cast from unicode to char *. But the encoding
> would *have* to be utf8 -- anything else would require memory
> allocation.

You're welcome! :)

The UTF-8 default encoding is hard coded in Python 3.0. IMHO it's the
most sensible encoding for users from the Western world. Asian users
would probably prefer UTF-16 but that's a waste of memory for the rest.

In my opinion wchar_t support is much more important than casting
PyUnicode objects to char*. Especially Windows developers need wchar_t
for the wide Windows API. Python 2.6 and 3.0 have dropped support for
the Windows 9x/ME/NT series. Only 2k SP4 and newer are supported.
wchar_t support is an important step for the poor souls ... err Windows
developers. ;)

Christian





More information about the Pyrex mailing list