I need to add Turkish symbols to shape file. But I cannot change the encoding during the saving shape file. Below is my code snippet:

FeatureSet fs = new FeatureSet(FeatureType.Polygon);

ProjectionInfo pStart = new ProjectionInfo();
pStart = KnownCoordinateSystems.Geographic.World.WGS1984;
fs.Projection = pStart;  
fs.DataTable.Columns.Add(new DataColumn("Sahə", typeof(string))); 

// create a geometry (square polygon)
List<Coordinate> vertices = new List<Coordinate>();

vertices.Add(new Coordinate(50.060444958508015, 40.55967497639358));
vertices.Add(new Coordinate(50.061042001470923, 40.554836019873619));
vertices.Add(new Coordinate(50.056969989091158, 40.554629992693663));
vertices.Add(new Coordinate(50.055287992581725, 40.559944035485387));
vertices.Add(new Coordinate(50.060444958508015, 40.55967497639358));

Polygon geom = new Polygon(vertices);

// add the geometry to the featureset. 
IFeature feature = fs.AddFeature(geom);

feature.DataRow.BeginEdit();
feature.DataRow["Sahə"] = "Əüei.."; 
feature.DataRow.EndEdit();


fs.SaveAs("C:\\test2.shp", true);

In test2.dbf file some symbols (ə,ü) are saved as '?' symbol.

0

There are 0 best solutions below