NLeSC / software.esciencecenter.nl

eStep website with projects software and people.
http://software.esciencecenter.nl
Other
4 stars 3 forks source link

Generator crashes on non-asci characters #94

Closed nielsdrost closed 8 years ago

nielsdrost commented 8 years ago

If a non asci character is in an input file it crashes the generator :-(

blootsvoets commented 8 years ago

UTF-support in general seems lacking (#87)

nielsdrost commented 8 years ago

Stack trace:

Traceback (most recent call last):
  File "/usr/local/bin/estep", line 9, in <module>
    load_entry_point('estep==1.0.0', 'console_scripts', 'estep')()
  File "/home/niels/workspace/software.esciencecenter.nl/estep/script.py", line 222, in main
    generate_reciprocal()
  File "/home/niels/workspace/software.esciencecenter.nl/estep/script.py", line 175, in generate_reciprocal
    f.write(object2jekyll(document, 'description'))
  File "/home/niels/workspace/software.esciencecenter.nl/estep/format.py", line 49, in object2jekyll
    return "---\n{0}---\n{1}\n".format(metadata, content)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 395: ordinal not in range(128)
blootsvoets commented 8 years ago

Fixed by #111