Changeset: f549b1ba5c4e for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f549b1ba5c4e
Modified Files:
        clients/R/MonetDB.R/R/dbi.R
Branch: embedded
Log Message:

R client: fix for dbWriteTable on non-utf platforms


diffs (12 lines):

diff --git a/clients/R/MonetDB.R/R/dbi.R b/clients/R/MonetDB.R/R/dbi.R
--- a/clients/R/MonetDB.R/R/dbi.R
+++ b/clients/R/MonetDB.R/R/dbi.R
@@ -483,7 +483,7 @@ setMethod("dbWriteTable", "MonetDBConnec
     else {
       if (csvdump) {
         tmp <- tempfile(fileext = ".csv")
-        write.table(value, tmp, sep = ",", quote = TRUE, row.names = FALSE, 
col.names = FALSE,na="")
+        write.table(value, tmp, sep = ",", quote = TRUE, row.names = FALSE, 
col.names = FALSE, na="", fileEncoding = "UTF-8")
         dbSendQuery(conn, paste0("COPY INTO ", qname, " FROM '", tmp, "' USING 
DELIMITERS ',','\\n','\"' NULL AS ''"))
         file.remove(tmp) 
       } else {
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to