Closed salucci closed 5 years ago
I managed to fix similar issue with ISO-8859-1
by modifying DBFParser.prototype.parse
code to set custom offset
value for the encoding (similarly as the author did for big5
).
Original:
offset = (encoding.match(/big5/i))?2:3;
My version:
switch(encoding.toLowerCase()) {
case "big5": offset = 2; break;
case "iso-8859-1": offset = 1; break;
default: offset = 3;
}
I found the working offset
value by trial & error. I hope this helps In case someone else bumps into this.
@vharmain Thanks a lot! You can send pull requests to this repo.
Hello, I liked this project a lot, unfortunately it's ocurring a little bug, when I load my project (shp + dbf) and generate a Json the properties are not well "splited" or formatted, tryed a couple of different Charsets but the bug persists
I opened the DBF with a GIS and It is ok
It seems like every char accented(á,é,ô etc) the last character of next column is "escaped" and rotated to the next column, for e.g. on DBF file: City Code Population CityA 001 333 CityBá 002 444 CityCá 003 555
after conversion: City Code Population CityA 001 333 CityBá 00 2444 CityCá 0 03555
and when the last column get its max size, the last char ir rotated to the beginning
what it could be? []'s