NetTopologySuite / NetTopologySuite.IO.ShapeFile

The ShapeFile IO module for NTS.
33 stars 25 forks source link

Ensure that specified encoding is used everywhere #53

Closed DGuidi closed 3 years ago

DGuidi commented 3 years ago

I must admit that I'm not sure about what I'm doing (!!!) but looks that cpgStreamProvider shall be initialized using encoding.WebPage (instead that encoding.EncodingName) so it's possible to rebuilt inside the dbf provider the actual encoding specified in the ShapefileDataReader constructor.

Looks a single line but actually a deep change, so please let me know how do you think.

Related issues #39 and #52

qiangwai commented 3 years ago

Some shape files do not have .cpg , caused the default encoding to be used when reading?

DGuidi commented 3 years ago

you can specify the encoding to be used in the ShapefileDataReader .ctor