Re: [Python-Dev] Unicode <--> UTF-8 in CPython extension modules

2008-02-22 Thread John Dennis
Colin Walters wrote: > On Fri, Feb 22, 2008 at 4:23 PM, John Dennis <[EMAIL PROTECTED]> wrote: > >> Python programs which use Unicode string objects for their i18n and >> which "link" to C libraries expecting UTF-8 but which have a CPython >> binding which only uses 's' or 's#' formats programs

Re: [Python-Dev] Unicode <--> UTF-8 in CPython extension modules

2008-02-22 Thread M.-A. Lemburg
On 2008-02-23 00:46, Colin Walters wrote: > On Fri, Feb 22, 2008 at 4:23 PM, John Dennis <[EMAIL PROTECTED]> wrote: > >> Python programs which use Unicode string objects for their i18n and >> which "link" to C libraries expecting UTF-8 but which have a CPython >> binding which only uses 's' or

Re: [Python-Dev] Unicode <--> UTF-8 in CPython extension modules

2008-02-22 Thread Colin Walters
On Fri, Feb 22, 2008 at 4:23 PM, John Dennis <[EMAIL PROTECTED]> wrote: > Python programs which use Unicode string objects for their i18n and > which "link" to C libraries expecting UTF-8 but which have a CPython > binding which only uses 's' or 's#' formats programs seem to often > fail with

Re: [Python-Dev] Unicode <--> UTF-8 in CPython extension modules

2008-02-22 Thread Martin v. Löwis
> I've uncovered what seems to me to a problem with python Unicode > string objects passed to extension modules. Or perhaps it's revealing > a misunderstanding on my part :-) So I would like to get some > clarification. It seems to me that there is indeed one or more misunderstandings on your part

[Python-Dev] Unicode <--> UTF-8 in CPython extension modules

2008-02-22 Thread John Dennis
I've uncovered what seems to me to a problem with python Unicode string objects passed to extension modules. Or perhaps it's revealing a misunderstanding on my part :-) So I would like to get some clarification. Extension modules written in C receive strings from python via the PyArg_ParseTuple fa