geocoders / geocoder-tester

Run search queries against a geocoder that supports geocodejson spec.
Other
40 stars 23 forks source link

Fixed unicode errors at reading test files #12

Closed jfgigand closed 8 years ago

jfgigand commented 8 years ago

Parameter encoding="utf-8" was missing on open() calls, and no preferred encoding was declared.

While it failed on my (rather bare) system, it may have worked elsewhere because of default OS settings, telling Python3 to use utf-8 as the default encoding for reading text files.

yohanboniface commented 8 years ago

Thanks :) Thought a "normal" Unix OS should be UTF-8 by default ;)

jfgigand commented 8 years ago

Yes... I actually don't know what "UTF-8 by default" means: there is a default "locale" (for program outputs, LC_* and LANG{,UAGE} ) and TERM type and encoding.

The issue here is about file reading itself by Python, which is not related to the user but to the CSV/Yaml files, whose encoding is set by the file itself and should be hard-coded independantly from the user environment ;)