I might be wrong but cpython uses UCS internally on unicode, so even if
sqlite had UTF-32 it would not work.


On Thu, Dec 27, 2012 at 11:33 AM, Elefterios Stamatogiannakis <
[email protected]> wrote:

> On 27/12/12 11:44, Armin Rigo wrote:
>
>> Normally, you should be able to pass a unicode object directly to a
>> "wchar_t *" argument and get a complete wchar_t-encoded string.  (Note
>> that wchar_t is 16-bit on Windows but 32-bit on Linux, for example.)
>>
>
> Armin thanks for the clarification.
>
> From your note, i see what went wrong. We were directly passing pypy's
> UTF-32 (we are testing on linux) to SQLite's UTF-16 API. So this is why we
> only got the first character on the SQLite side.
>
> Also linux's 32 bit wchars are unfortunate in our case, because SQLite
> only supports UTF-8 and UTF-16 in their API. So there is no way on linux to
> directly pass pypy's unicode strings to SQLite.
>
>
> l.
>
> ______________________________**_________________
> pypy-dev mailing list
> [email protected]
> http://mail.python.org/**mailman/listinfo/pypy-dev<http://mail.python.org/mailman/listinfo/pypy-dev>
>



-- 

Leonardo Santagada
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to