freelawproject / courts-db

A database of courts, tests and other experiments
BSD 2-Clause "Simplified" License
57 stars 15 forks source link

Specify encoding when opening files #73

Closed quevon24 closed 1 year ago

quevon24 commented 1 year ago

This change specifies encoding to utf-8 to ensure cross-platform compatibility when opening files in text mode. This change specifies the encoding to utf-8 to ensure cross-platform compatibility when opening files in text mode. In this case when loading the json files for courts, variables, states, places, etc.

With this change, Windows users will have no problem when running tests due to court accents (specifically for puerto rico).

mlissner commented 1 year ago

Annoying bug! Thanks for fixing it. I thought we had semgrep set up to check for this. I'll go make sure it's turned on for this repo.

mlissner commented 1 year ago

OK, I added semgrep as a CI task. We'll catch this going forward (hopefully).