HXLStandard / libhxl-python

Python support library for the Humanitarian Exchange Language (HXL) data standard.
The Unlicense
41 stars 11 forks source link

Character encoding issues on Windows but not Linux #300

Closed mcarans closed 1 year ago

mcarans commented 2 years ago

If you run the following code, you get different results on Windows to Linux:

import hxl
url = "https://docs.google.com/spreadsheets/d/1NjSI2LaS3SqbgYc0HdD8oIb7lofGtiHgoKKATCpwVdY/export?format=csv&gid=1088874596"
countries = hxl.data(url)
for country in countries:
    print(country.get("#country+name"))

On Windows, you get:

Afghanistan
Ã…land Islands
Albania
...
Cuba
Curaçao
Cyprus
...
Tunisia
Türkiye
Turkmenistan
...

On Linux, you get:

Afghanistan
Åland Islands
Albania
...
Cuba
Curaçao
Cyprus
...
Tunisia
Türkiye
Turkmenistan
...