Ok, thank you.
Now I will probably read a part of spss base with Python reader.
I have also checked and seen, that the latest version of RPy is from
August 2010. Has focus moved to rpy2 ?
I have heard however that the version of rpy that correspondes to
Python 3 can handle UTF-8, but I don't know, maybe it was meant for
rpy2.
To my knowledge rpy corresponds to Python 27 top.

Best

Marko



On Mon, Mar 5, 2012 at 4:07 PM, Laurent Gautier <lgaut...@gmail.com> wrote:
> rpy predates R's support for UTF-8, and I'd think that you are mostly on
> your own.
>
> Note that rpy2 has UTF-8 support.
>
> Best,
>
> L.
>
>
>
> On 2012-03-05 14:41, Marko Limbek wrote:
>>
>> Hi!
>>
>> I turned to list once already with this question, but I haven't
>> received any answer. I would be glad to solve that.
>> Probably it's just a small problem with Unicode, however I don't know
>> the answer.
>> I use RPy and read the spss database with method read.spss inside a
>> nested R code in Python, that looks like that:
>>
>>
>>
>> # -*- coding: utf-8 -*-
>> # coding=<utf-8>
>> #!/E:/Python
>>
>> import rpy
>> from rpy import r
>>
>> r("""
>>
>> library(foreign)
>>
>> baza<- read.spss(""" + analysis[0] + """)
>>
>> print(baza$demo_izob0)
>>
>> """)
>>
>>
>> Now when my text data labels in spss have slavic characters, they are
>> not recognised and output is something like that:
>>
>> stiriletna srednja �ola
>> nedokon�ana osnovna �ola
>>
>>
>> Is there any idea what I should do here?
>> The same code in pure R environment gives me
>>
>> stiriletna srednja šola
>> nedokončana osnovna šola
>>
>>
>> In Python code slavic characters work just fine in the code with upper
>> encoding.
>>
>> Many thanks for any hint!
>>
>>
>> Marko
>>
>>
>> ------------------------------------------------------------------------------
>> Try before you buy = See our experts in action!
>> The most comprehensive online learning library for Microsoft developers
>> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
>> Metro Style Apps, more. Free future releases when you subscribe now!
>> http://p.sf.net/sfu/learndevnow-dev2
>> _______________________________________________
>> rpy-list mailing list
>> rpy-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rpy-list
>
>

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to