Skip to content
Prev 109712 / 398500 Next

dbi, rodbc, rmysql, charset problem

You seem never to have told R or us what charset these data are in. I 
think it is likely that they are being transferred in latin2 (like your 
email), and you are running R in UTF-8 according to Sys.getlocale.  So 
what you need to do is to either

1) Run R in latin2

or

2) use iconv() to convert the results from latin2 to UTF-8.

UTF-8 is relatively new in the DBMS world.  For ODBC, look at the bug 
reports on the MySQL site.  Using RODBC with UTF-8 locales is on my TODO 
list, but of no urgency at all.
On Sun, 18 Feb 2007, janek0 wrote: