[R-sig-Geo] readOGR does not read file names with accent

Patrick Giraudoux patrick.giraudoux at univ-fcomte.fr
Thu Feb 15 07:46:24 CET 2018


Dear all,

My plateform is Windows 7. I am meeting trouble when reading a shapefile 
with rgdal:readOGR when the file name includes an accent.

For instance,

readOGR("./track 
génét/gélinotte/2017/Trémontagne","trace_chaux_du_dombief.shp")is well read

BUT
readOGR("./track 
génét/gélinotte/2017/Trémontagne","tracé_chaux_du_dombief.shp")gives

Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, 
use_iconv = use_iconv, :
   Cannot open layer

In both cases accents in the path are well accepted. The difference just 
come from accent in the filename.

Any idea about a workaround (except trivial: manually changing accents 
to non accent ;-): I have tens of files to read)?

Best,

Patrick



	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list