Re: [pypy-dev] CFFI and UTF8

2014-07-31 Thread Armin Rigo
Hi, On 31 July 2014 16:47, Eleytherios Stamatogiannakis wrote: > Wouldn't it be faster to have a ffi.stringUTF8 for the case where we know > the input is in UTF8? It seems the truth is the opposite of what you expect. Right now, `ffi.string(p).decode('utf-8')` does two copies, whereas in the pr

[pypy-dev] CFFI and UTF8

2014-07-31 Thread Eleytherios Stamatogiannakis
Hello, First of all, directly supporting UTF8 in CFFI has been discussed before. I'm bringing the same subject again because now PyPy aims to convert to using UTF8 internally by default. So the question is, will CFFI take advantage of that? Right now cffi_backend's "b_string" works with ASCI