On Nov 27, 2009, at 3:05 PM, Greg Ewing wrote:

> Robert Bradshaw wrote:
>> So, my proposal
>> is this: let the user specify via a compiler directive an encoding to
>> use for all conversions. Cython could then transparently and
>> efficiently handle all char* <-> str (a.k.a. unicode) encodings
>
> There's another kind of problem with implicit conversion from
> str to char * in Py3: for any encoding other than utf8, it requires
> allocating memory, and then there's the issue of who owns it
> and how it gets deallocated.

Yes, that's a good question, and I'm not sure how best this could/ 
should be handled. However, even just supporting utf8 would be simple  
first step. (Also ASCII only could be supported via the same defenc  
slot and a bit of manual checking.)

- Robert

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to