Details on file:
My data attributes have these properties
> str(for.ana@data)
'data.frame': 994 obs. of 14 variables:
$ gr.for : chr "Peupleraie" "Érablière à sucre pure ou à feuillus" "Érablière à sucre pure ou à feuillus" "Érablière rouge" "Érablière rouge" ...
$ SUP_nrm : num 0.388 0.388 0.388 0.388 0.388 ...
$ FORME_nrm : num 0.413 0.632 0.444 0.75 0.464 ...
$ RAR_nrm: num 0.116 0.116 0 0 0.116 ...
The only value that shows up in the exported file when I open it in QGIS
is Peupleraie
(i.e. the one without accents).
Here is more information on the shapefile I want to export.
new("SpatialPolygonsDataFrame"
, data = structure(list(gr.for = c("Érablière à sucre pure ou à feuillus",
"Érablière à sucre pure ou à feuillus", "Érablière rouge", "Érablière rouge",
"Érablière à sucre pure ou à feuillus"), SUP_nrm = c(0.387667865408362,
0.387667865408362, 0.387667865408362, 0.387667865408362, 0.387667865408362
), FORME_nrm = c(0.41326538523008, 0.632328804567057, 0.444390436010826,
0.749753344765862, 0.46396738636008)), .Names = c("object_ID",
"gr.for", "SUP_nrm", "FORME_nrm"), row.names = c(175L, 150L,
671L, 522L, 168L), class = "data.frame")
, polygons = list(<S4 object of class structure("Polygons", package = "sp")>,
<S4 object of class structure("Polygons", package = "sp")>,
<S4 object of class structure("Polygons", package = "sp")>,
<S4 object of class structure("Polygons", package = "sp")>,
<S4 object of class structure("Polygons", package = "sp")>)
, plotOrder = c(4L, 2L, 5L, 3L, 1L)
, bbox = structure(c(319443.511198756, 5046058.007804, 321702.427432819,
5048250.11169816), .Dim = c(2L, 2L), .Dimnames = list(c("x",
"y"), c("min", "max")))
, proj4string = new("CRS"
, projargs = "+proj=tmerc +lat_0=0 +lon_0=-73.5 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
)
)
(I can't share the shapefile because it is proprietary)
I'm fairly certain that the problem is not when I upload the files in QGIS and issues with encoding. I've set endoding to UTF-8
and it's not just the characters with accents that disappear, it's the entire cell.
When I run into encoding issues, it looks more like this example with correct UTF-8
on the left and incorrect System
on the right: