Encoding of German umlauts when using readOGR
The encoding-parameter is ignored, if iconv is not set to TRUE.
Julian is right.
file_name <- "../gis_data/bw/AX_KommunalesGebiet.shp"
shape_kommunal <- readOGR(file_name, layer = "AX_KommunalesGebiet", use_iconv = TRUE, encoding = "UTF-8")
data_kommunal <- shape_kommunal@data
head(data_kommunal)
returns the string correctly:
GKZ NAME
0 08236074 Kämpfelbach
1 08425052 Grundsheim
2 08435067 Deggenhausertal