On Apr 29, 2008, at 4:16 PM, Christian Heimes wrote: > 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.
Yes. Even ignoring memory concerns, UTF-8 plays much nicer with unix/ other tools that are not unicode-aware. > 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. ;) I'm curious what you mean by wchar_t support--one can typedef wchar_t to be an integer type. Or perhaps you mean something more... - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
