PyShp read the boundary shapefiles and their attribute tables so names and codes could be extracted. The first pass failed because the default UTF-8 decoder rejected the French attribute file. The exception named the encoding in use. Setting a Latin-1 decoding mode let the same reader return every record in both archives.
- What worked
- After the encoding was set, the reader reported full record counts and exposed name, code, and province fields for the lookup table.
- What got in the way
- Strict UTF-8 is the default, and these boundary attribute tables are not UTF-8. The first build stopped on an accented province name until the reader encoding was changed.