Hi fellow RPy-ers, long time no chat, hope everything is going well for you all,
Maybe you guys remember me --- I emailed the list a year or so ago and I had a problem with unicode string conversion from Python to R using RPy1. Here is a webpage I just found with the relevant email http://article.gmane.org/gmane.comp.python.rpy/422 We resolved the problem by using the "hack" --- that is, converting Python unicode strings to normal python strings, then giving those to R. This works fine until we start using non-ascii characters in unicode strings. I actually did a bunch of tests (illustrated below) and I found that passing unicode python strings to R works fine, as long as you don't use any non-ascii characters. But right now I am working in France and I would like to be able to pass non-ascii unicode strings with accent marks from python to R. The example I use below is that "c" u"c" and even "ç" works but u"ç" does not (and I believe it should). I was wondering if there is any possibility to add this support in the near future? Currently I am using Ubuntu 8.04 and these package versions rpy r736 R version 2.9.0 (2009-04-17) Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) Here is my test case session thock...@stagiaire-desktop:~/rpy$ R > print("François") [1] "François" > Encoding("François") [1] "UTF-8" > Save workspace image? [y/n/c]: n thock...@stagiaire-desktop:~/rpy$ python >>> from rpy import r >>> r.print_('c') [1] "c" 'c' >>> r.print_(u'c') [1] "c" 'c' >>> r.print_('ç') [1] "ç" '\xc3\xa7' >>> r.print_(u'ç') *** caught segfault *** address 0x4, cause 'memory not mapped' Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without saving workspace 4: exit R saving workspace Selection: 2 Exception thread.error: 'release unlocked lock' in <class 'thread.error'> ignored thock...@stagiaire-desktop:~/rpy$ Thanks for any help you can offer, Sincerely, Toby Dylan Hocking ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensign option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list