I am trying to read a shapefile with German letters (e.g.ß) with the following script:
import geopandas as gpd
df = gpd.read_file(
r"path/to/file.shp",
engine="pyogrio",
use_arrow = True
)
However, I get an encoding error, and I did try to specify it with encoding = "utf-8", but I alsow tried "latin" and "ISO-8859-1", but none worked.
This is the error message:
ArrowException: Unknown error: Wrapping Chausseestra�e failed
How can I fix it?
Is there a way to do this?
encoding = "cp1250"? – Taras Nov 09 '23 at 15:59.cpgfile and any encoding details present in the.dbfLDID header block are considered. – Taras Nov 09 '23 at 18:33CP1252. In the past it solved some issues for me with the textmaïs(= dutch) in shapefiles. – Pieter Nov 10 '23 at 07:49CP1252doesn't work, try replacing theCP1252with some alternative encodings in the .cpg file, e.g.CP1250,ISO-8859-1,Windows-28591,... – Pieter Nov 10 '23 at 07:57