How to convert unicode string to unsigned char *

2008-05-05 Thread Simon Posnjak
Hi! I have a C module for which I created a wrapper with swig. The function def is: C: int some_thing(unsigned char * the_str); eg: Python: some_module.some_thing (the_str) Now I would like to feed it with a UTF-8 formatted string: test = u'Make \u0633\u0644\u0627\u0645, not war.' If I

Re: How to convert unicode string to unsigned char *

2008-05-05 Thread Simon Posnjak
On Mon, May 5, 2008 at 4:16 PM, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Mon, 5 May 2008 16:05:08 +0200, Simon Posnjak [EMAIL PROTECTED] wrote: On Mon, May 5, 2008 at 3:48 PM, Jean-Paul Calderone [EMAIL PROTECTED] wrote: On Mon, 5 May 2008 15:41:08 +0200, Simon Posnjak [EMAIL