[C++-sig] Working with python unicode strings without wstring

Roman Yakovenko roman.yakovenko at gmail.com
Sun Aug 6 11:45:56 CEST 2006


On 8/6/06, Markus Heller <markus at relix.de> wrote:
> Dear Roman,
>
> > > > May be you should use another set of API?
> > > > http://docs.python.org/api/unicodeObjects.html
>
> well, I have done some experiments with the API you're suggesting. Though, I
> have a number of problems here:
>
> I see that Py_UNICODE refers to one single character / symbol which may be any
> symbol whatsoever in its numeric representation.
>
> I see that when I retrieve my unicoded Python string with
>
> PyContainer = PyList_GetItem(Tuple, 1);
>
> and when I convert the PyObject "PyContainer" into a PyUnicodeObject, I do it
> with a simple cast, which works fine. Then, I'd like to get hold of the
> individual symbols, also in their numeric (not encoded) representation. But
> how can I do this? Initially, I wanted to get everything into the form of a
> stl string, but a stl vector will also do fine.
>
> Thanks very much for your help!

I did not help you. I think you will be more productive if you will
ask this question
on Python user group.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list