2

I'm running into a cython-unicode problem which I hope you can help me with -

I'm trying to compile with cython a python module which works alot with unicode objects.

I'm working on Ubuntu 12.04 32bit, (on a VM on a Win7 64bit host if it has any importance), I'm using Py2.5.4 (can't change that) which I've installed side-by-side with the provided Py2.7.3 (and soft-linked /usr/bin/python to /usr/bin/python2.5), and Cython 19.02 (current one). I'm compiling with no special flags.

Now, as compiling goes seemingly OK, when I open a Py (same 2.5.4) and try to import the resulting. SO file, I get a PyUnicodeUCS2 type error. That is supposed to mean, as I understand, that the SO was compiled on a python configured with UCS4, and imported to python configured with UCS2. But It's the same python I compiled on and imported to.

for compilation I use $ python setup.py bild_ext --inplace where setup.py uses distutlis.extension.Extension and Cython.Distutile.build_ext .

Can someone enlighten me with what's going on and what I can do with it?

I'll be happy to provide more details if I wasn't clear enough.

Thanks a lot..

Krish R
  • 22,583
  • 7
  • 50
  • 59
Ori5678
  • 499
  • 2
  • 5
  • 15
  • What value is returned from `import sys; sys.maxunicode`? – Snorfalorpagus Nov 13 '13 at 21:56
  • A value about 110K, which obviously means that the python works with unicode chars of 4 bytes. The thing I dont understand is that I, seemingly at least, made my compilation on the same installation. So, were did the UCS2 come from? – Ori5678 Nov 15 '13 at 03:31

0 Answers0