作者a3230127 (Krad)
看板Programming
标题[问题] RMySQL问题
时间Thu Oct 22 22:38:38 2015
目前在使用R语言连结MySQL
使用的是RMySQL的套件,
每次要叫出MySQL里面的Table时候
如果table是中文,就会出现以下讯息
could not run statement: Invalid utf8 character string: '\xA4\xA4\xA4'
(上面的table名称为中文)
如果table名称是英文,可以读取到atribute的部分
但是如果atribute的名称是中文,又会出现乱码
如果atribute的值也是中文,最後结果都会出现乱码
> dbGetQuery(con, "select * from ggg")
id 銝饼\x96\x87
1 1 \xe6\x88\x91
(atribute是id ,主文
资料是 1 ,我 )
请问要怎麽解决??????????
还有可以在R里面直接写入atribute还有其值到资料库里面吗?
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 1.162.172.222
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Programming/M.1445524720.A.06F.html
※ 编辑: a3230127 (1.162.172.222), 10/22/2015 22:41:35