MerginMaps / MerginMaps/geodiff
GeoDiff 2.3.0 cannot open GeoPackage when filename contains Unicode character (EM DASH U+2014) on Windows
@dvdkon is already working on this.
Since Sep 4, 2026.
- Dominant language
- Python
- Stars
- 183
- Forks
- 21
- Avg merge
- 9d 11h
- Merged PRs (30d)
- 2
Description
Environment
• GeoDiff 2.3.0
• Mergin DB Sync 2.3.0
• Windows 11
• Python 3.12 (also reproducible with the GeoDiff executable bundled with db-sync)
Description
I found what appears to be a reproducible issue in GeoDiff on Windows when opening a GeoPackage whose filename contains a Unicode character (EM DASH, U+2014).
The issue is reproducible using the standalone GeoDiff executable, so it does not depend on Mergin DB Sync.
Steps to reproduce
Create (or rename) a GeoPackage to:
camada_mergin_maps_—estacoes_amostragem_teste__estaes_de_amostragem.gpkg
(where the character between maps and estacoes is an EM DASH, U+2014)
Run:
geodiff.exe schema "C:\Temp\camada_mergin_maps—_estacoes_amostragem_teste__estaes_de_amostragem.gpkg"
Actual result
GeoDiff reports:
Error: Missing 'base' file when opening sqlite driver:
C:\Temp\camada_mergin_maps_ù_estacoes_amostragem_teste__estaes_de_amostragem.gpkg
Error: export changeset to summary failed!
Notice that the filename reported by GeoDiff is already corrupted (— becomes ù).
Expected result
GeoDiff should successfully open the GeoPackage and output its schema.
Verification
The exact same GeoPackage behaves differently depending only on its filename.
The following command fails:
geodiff.exe schema "C:\Temp\camada_mergin_maps_—_estacoes_amostragem_teste__estaes_de_amostragem.gpkg"
However, after copying exactly the same GeoPackage to:
C:\Temp\teste.gpkg
running
geodiff.exe schema "C:\Temp\teste.gpkg"
correctly outputs the schema.
The GeoPackage itself is valid and also opens normally in QGIS.
The only difference between the two tests is the filename.
This suggests that GeoDiff may not correctly handle filenames containing this Unicode character on Windows.
Additional information
While investigating this issue, I also noticed that Mergin DB Sync 2.3.0 crashes with:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x97...
because it attempts to decode GeoDiff's stderr as UTF-8.
After modifying the DB Sync source code to preserve the original stderr, the underlying GeoDiff error became visible, leading to the reproduction steps described above.
Notes The issue was initially discovered while running Mergin DB Sync 2.3.0. After instrumenting DB Sync to print the original GeoDiff stderr output, it became clear that the problem could be reproduced directly with the standalone GeoDiff executable, independently of DB Sync.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.