[Tutor] Question about writing to Excel with slavic characters
Steven D'Aprano
steve at pearwood.info
Mon Mar 5 15:17:35 CET 2012
Marko Limbek wrote:
> Thank you!
>
> That was easy. Now I have another problem.
> I use RPy and read the spss database with method read.spss inside a
> nested R code in Python, that looks like that:
>
>
> import rpy
>
> 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
>
>
> What should I do here?
Since the SPSS labels are being read by R, not Python, my guess is that this
is likely a problem with R, not Python.
You might find the rpy mailing list more helpful for solving rpy problems.
https://lists.sourceforge.net/lists/listinfo/rpy-list
Good luck!
--
Steven
More information about the Tutor
mailing list