Closed gpetit closed 3 years ago
@ebocher I'm on it
I have the same problem with GeoJsonRead
Section 8.1 of RFC 8259 strongly requires UTF-8 as the only one encoding for data exchange. Obsolete RFC 7159 and older specifications allowed UTF-8, UTF-16, and UTF-32, but all these 5 encodings (including BE/LE variants) can be auto-detected in JSON text easily. Therefore I don't see any good reasons to have encoding parameter in these two functions, read function can accept all of them and write function may use UTF-8 unconditionally.
ISO-8859-1 as documented default also looks wrong, because this encoding may not be legally used for JSON text.
I'm in favor of @katzyn comments even if I introduce some of the last bad encoding support. It was necessary for a project but we must be compliant with standards.
@ebocher I'm on it
Would be better to push it in https://github.com/ebocher/H2GIS/tree/update_jtsversion because there will have to many changes
@SPalominos Fixed ?
Fixed GeoJson and Json write use only utf-8
I have a problem when trying to write a GeoJSON file, using the
fileEncoding
parameterI have the following
TEST
tableNow I export this table into a
geojson
fileIt works well.
Now, the same but specifying the
fileEncoding
The
test.geojson
is created but is empty and I have this error messageI also tried writing the encoding in lower case, but it's the same
Remark : it means that in this driver we test the encoding ? If yes, in other drivers (such as
TSVWrite
) we don't do the same since it's possible to write weird encoding (e.g 'utf-ofhjzofh')