agstudy / rsqlserver

Sql Server driver database interface (DBI) driver for R. This is a DBI-compliant Sql Server driver based on the System.Data.SqlClient.
82 stars 30 forks source link

How to specify "encoding" #8

Open ChanningWong opened 9 years ago

ChanningWong commented 9 years ago

I've tried to set "encoding/Encoding/DBMSencoding" = "GBK" in url/dbConnect()/dbSendQuery()/fetch() but failed. Is there any parameters to specify character encoding?

-- code --

library("rsqlserver")
url = "Server=192.168.1.101;user=sa;password=**;Database=mydata;Trusted_Connection=True"
conn <- dbConnect("SqlServer", url = url)
a = dbSendQuery(conn, "SELECT TOP 5 *  FROM [mydata].[dbo].[data]")
fetch(a)
agstudy commented 9 years ago

What do you mean by encoding here ?