SharpMap中文乱码是因为编码问题
ShapeFile 的默认的Encoding为UTF7,而我们的中文一般为GB2312,用下面的代码就可以显示中文了。
//Set up the countries layer
SharpMap.Layers.VectorLayer layCH_Other = new SharpMap.Layers.VectorLayer("CH_Other");
//Set the datasource to a shapefile in the App_data folder
SharpMap.Data.Providers.ShapeFile shp = new SharpMap.Data.Providers.ShapeFile
(HttpContext.Current.Server.MapPath(@"~/App_data/CH/P1.shp"), true);
shp.Encoding = System.Text.Encoding.GetEncoding("gb2312");
layCH_Other.DataSource = shp ;