Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I use Mathematica and Pythonika to run Python code inside it. And I'm not quite sure what causes my issue: all unicode Python objects look like this: А\.00л\.00е\.00к\.00с (instead of Александр), i.e. there is an extra symbol after each letter, and thus the string is truncated (its length remains same). At the Pythonika page the author mentioned that unicode is supported, although not well-tested. Anyone experienced this? What are the possible workarounds?

share|improve this question
2  
It sounds like this is a Pythonika problem/bug in the C layer connecting Mathematica and Python. Have you contacted the author of Pythonika? I'd say the question is on the border of being off-topic ... Unfortunately Pythonika is a bit sloppily implemented. It is a useful package, but it's a quick and dirty implementation. It would take considerably more work to implement a proper link. –  Szabolcs May 23 '13 at 14:02
    
Anyway, can you please give a full but minimal example that reproduces the problem? Post the precise code that you used, but reduce it to the essentials (a few lines). I'll take a look then. –  Szabolcs May 23 '13 at 14:05
    
@Szabolcs: oh, that was really a probably bug in Pythonika, didn't think about it being possible. I've fixed it (both for unicode and non-ascii strs), probably in a hacky way as I'm not quite good at C. Fix is available at hg.aplavin.ru/pythonika –  aplavin May 23 '13 at 14:39
    
Excellent, thanks! (and +1 for the answer) –  Szabolcs May 23 '13 at 14:56
    
I wrote to the author once in the past but got no reply. If it will be the same this time, we should collect these fixes somewhere. I was also just playing with it and was planning to put it here (haven't pushed the changes yet). –  Szabolcs May 23 '13 at 14:59

1 Answer 1

up vote 3 down vote accepted

This issue was caused by a bug in Pythonika. Fix is now available at http://hg.aplavin.ru/pythonika/, will send it to the author.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.