I read a shapefile (zipped) with GDAL library in C#. Shapefile contains .cpg file with "UTF-8" encoding specified.
When I call
Feature.GetFieldAsString(attributeName) some of the attribute values get trimmed at the end, and some have broken symbols.
Converting shapefile to GeoJSON with ogr2ogr makes a GeoJSON file with all attributes as they are supposed to be.
For example, value returned by
GetFieldAsString is "\"Тер�", when the real value, also seen in geojson is "\"Терем+\"".
This doesn't seem to be an issue with encoding, for the beginning of the string is read correctly. But I have no clue where to look for the solution for this issue.