-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlatGeobuf: does not support lco ENCODING #2254
Comments
FlatGeobuf only supports UTF-8 by design. Can you clarify what the expected behavior is here and supply the test data? |
Warning: This now will be offtopic here and I should move it to QGIS' issue list. It just wasn't clear to me, whether_FlatGeobuf_ supports other encodings than UTF-8. There is a snippet in my initial post, which can be used to reproduce the problem. I've loaded the FGB into QGIS and it used "system" encoding as a standard, like it does on most shapefiles. I first thought, FlatGeobuf is behaving to a shapefile, which allows any encoding. But I think, it's an issue of the way, GDAL (or QGIS itself) identifies the codepage. Since you clarifyed, FlatGeobuf can be UTF-8 only, it should be reported to QGIS that the incoming dataset is UTF-8. I don't know, if this is QGIS' or GDAL's job. It's correctly handled in GDAL, so there seems to be the missing flat for QGIS that the incoming data is encoded in UTF-8. |
Ah, maybe here we go? qgis/QGIS#34381 |
Nice find @tobwen, I've often been fooled by how QGIS tries to guess shapefile encoding. Now, if it will solve this issue I'm not sure yet. |
@tobwen if you have the possiblity, please test with QGIS nightly on Windows and report back. |
I don't think there's a QGIS issue here -- even in versions with the confusing shapefile encoding handling, these only applied to shapefile sources (not other ogr sources) |
@bjornharrtell OGRFlatGeoBufLayer::TestCapability() should likely advertize OLCStringsAsUTF8 |
@rouault thanks that definitely seems to be the right thing to do. |
Expected behavior and actual behavior.
Right now, it's not possbile to set the encoding using
-lco ENCODING
. It's unknown if FlatGeobuf supports UTF-8 only by design.Steps to reproduce the problem.
Testfile (test.geojson)
Operating system
Microsoft Windows 10, 64 bit - Version 10.0.17763.678
GDAL version and provenance
GDAL 3.1.0dev, released 2019/99/99 from OSGeo4W (update 2020-02-17)
The text was updated successfully, but these errors were encountered: