[R-sig-Geo] readOGR does not read file names with accent
Roger Bivand
Roger.Bivand at nhh.no
Thu Feb 15 07:57:48 CET 2018
... and could you try sf::st_read(), as it uses enc2utf8() internally? If that works, the same may be used in rgdal.
Roger
Roger Bivand
Norwegian School of Economics
Bergen, Norway
Fra: Roger Bivand
Sendt: torsdag 15. februar, 07.49
Emne: Re: [R-sig-Geo] readOGR does not read file names with accent
Til: r-sig-geo at r-project.org, Patrick Giraudoux
Patrick: Is there also a space in the file path? What is the locale, I guess CP1252? Best wishes, Roger Bivand Norwegian School of Economics Bergen, Norway Fra: Patrick Giraudoux Sendt: torsdag 15. februar, 07.45 Emne: readOGR does not read file names with accent Til: r-sig-geo at r-project.org Kopi: Roger Bivand 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]] _______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list