OpenTreeMap / otm-core

OpenTreeMap is a collaborative platform for crowdsourced tree inventory, ecosystem services calculations, urban forestry analysis, and community engagement.
www.opentreemap.org
Other
188 stars 87 forks source link

Decode CSV header row field names so that they correctly validate #3219

Closed jwalgran closed 7 years ago

jwalgran commented 7 years ago

The CSV reader encodes non-ASCII characters as UTF-8, which was causing the header row field validation to fail. Decoding the CSV field names before comparing them to the field names stored in the database resolves the issue.


Testing

The the file should validate successfully and trees added to the map should have values in the Localização field.


Connects to https://github.com/OpenTreeMap/otm-addons/issues/1467

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 83.844% when pulling f603e39d1515976d6a3dd15d0501ff7b2202b4ee on jwalgran:feature/import-unicode-headers into 0cabbd4cdf64a93186cd77ddbc08bb632a614cac on OpenTreeMap:develop.

dboyer commented 7 years ago

Fields with symbols are not displaying correctly in Excel. No need to fix that now.