dbplyr copy_to截断带有重音单词的字符串

时间:2019-02-01 12:40:20

标签: r dplyr dbplyr

在数据库中插入包含重音词的字符串(西班牙省名):

PROVINCE
------------
Málaga
Córdoba
Cádiz

结尾
PROVINCE
------------
    M
    C
    C

     insertconnection <- DBI::dbConnect(RMySQL::MySQL(),
                                  host = "myhost",
                                  user = "myuser",
                                  password = "mypass",
                                  db = "mydb"
      )

    dbExecute(insertconnection, as.character('set character set "utf8"'))

    copy_to(insertconnection, dataframe, temporary = FALSE, overwrite = TRUE)

0 个答案:

没有答案