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.
By default, Python assumes the value of
locale.getpreferredencoding()
for the encoding of files loaded as text. On Windows, this is alwayscp1252
, 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.