[R] R encoding question

Xiaobo Gu guxiaobo1982 at gmail.com
Wed Nov 24 15:18:44 CET 2010


Hi,
 I am using RpgSQL to retrieve data from a PostgreSQL database wich is
with encoding UTF8, and I have some Chinese character in one of the
columns, unfortunately R can't show it correctly.

> df <- dbGetQuery(con, "select * from test")
> df
  a            b
1 1 顾小æ³\xa2
2 2   覃æ EURO\xa1

I see the following option, do I need to change the encoding option to
show the corresponding texts? In my case how to set?

$encoding
[1] "native.enc"

Thanks,
Xiaobo Gu



More information about the R-help mailing list