ReScience / template

Template for article submission
GNU General Public License v3.0
19 stars 24 forks source link

fix minor UTF8 bug in yaml-to-latex.py #5

Closed broukema closed 5 years ago

broukema commented 5 years ago

If the user enters non-ascii metadata in metadata.yaml in UTF8, e.g. name: Institute of Ąćçęńted Letterś in Półiśh and Freńćh address: Żyźszczyń but in the terminal has a non-UTF8 locale setting such as LANG=C or LANG=fr_FR.ISO-8859-1, then yaml-to-latex.py will yield an error and 'make' will fail.

This commit sets the locale, within the python process, to en-US.UTF-8. It should fix Issue https://github.com/ReScience/template/issues/4

Further improvements could be to check whether the existing locale is UTF-8 and to warn the user if it is not.

khinsen commented 5 years ago

Thanks!