js-shapefile-to-geojson
js-shapefile-to-geojson copied to clipboard
js-shapefile-to-geojson read chinese(solved)
¤j®a¦n(大家好) I can not find how to convert to chinese I do not very know unicode but I try big-5 , utf-8 and convert online tool but it is still wrong
please help me thank !
I have the same problem, have you solved it?
1.change encode dbf.js xhr.overrideMimeType("text/plain; charset=x-user-defined") to xhr.overrideMimeType("text/plain; charset=big5") 2. big5 need 4 (2 char) but ascii only 2 (1 char) stream.js for(var i = 0; data[i]; i++){ buff.push(fromCharCode(data.charCodeAt(i) & 0xff)); } to for(var i = 0; data[i]; i++){
buff.push(fromCharCode(data.charCodeAt(i) ));
if((data.charCodeAt(i) & 0xff) != data.charCodeAt(i)){
t.length++;
buff.push(fromCharCode(32 )); //空ç½
}
}
thanks ,I solved it.