1Password / solutions

Examples and templates from the 1Password Solutions team
MIT License
101 stars 14 forks source link

Open export file as UTF-8 #35

Closed plttn closed 1 year ago

plttn commented 1 year ago

By default, Python assumes the value of locale.getpreferredencoding() for the encoding of files loaded as text. On Windows, this is always cp1252, which can result in issues with Unicode text encoding being included in the CSV. This changes the script to explicitly load the CSV as UTF-8, rather than relying on the environment. This should improve compatibility when run on Windows environments.