[R-sig-Geo] How can I read a path containing multibyte characters using the read_sf () function?

小川福嗣 fukutugu at yahoo.co.jp
Thu Aug 17 13:32:35 CEST 2017


Dears,

How can I read data containing multibyte characters in windows
using the read_sf () function?

library(sf)
nc <- st_read(system.file("shape/nc.shp", package="sf"))
write_sf(nc, dsn=enc2utf8("データ"), layer="test", driver="ESRI Shapefile")
dsn = enc2utf8("データ/test.shp")
read_sf(dsn)

ERROR:
Cannot open data source C:\Users*****\nc\データ
Error in CPL_read_ogr(dsn, layer, as.character(options), quiet, type, :
Open failed.

best,
Ogawa



More information about the R-sig-Geo mailing list