[redland-dev] UCS-4 unicode support in python bindings

Dave Beckett dave at dajobe.org
Tue Oct 5 19:02:44 CEST 2010


On Tue, 5 Oct 2010, Jasper Op de Coul wrote:
> Hi,
>
> I'm wondering if it is possible to use the redland python bindings when
> python is compiled with the --enable-unicode=ucs4 flag. This is the
> default on new Ubuntu servers.
>
> When using a ucs4 python the `Redland_python.unicode_to_bytes` method
> most of the time fails. The error that is raised is masked by a SytemError
>
> >>> for i in range(100): print RDF.Node(u'foo')
> ...
> > Traceback (most recent call last):
> >  File "<stdin>", line 1, in <module>
> > SystemError: error return without exception set

I don't know the answer to your first question, but I fixed the
exception handling in the bindings code for python in the last release
1.0.11.1 to use a new function.

I think it's UCS2 specific so it might need some conditional code 
somewhere in
http://github.com/dajobe/redland-bindings/blob/master/python/redland-post.i

Dave


More information about the redland-dev mailing list