thorstenb / odpdown

Generate OpenDocument Presentation (odp) files from markdown
Other
107 stars 18 forks source link

cannot include UTF symbols in Markdown #13

Closed aspiers closed 9 years ago

aspiers commented 9 years ago

For example, including the trademark symbol results in:

Traceback (most recent call last):
  File "/home/adam/SUSE/git/odpgen/odpgenerator.py", line 810, in <module>
    main()
  File "/home/adam/SUSE/git/odpgen/odpgenerator.py", line 801, in main
    pages = mkdown.render(markdown.read())
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 927, in render
    return self.parse(text)
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 930, in parse
    out = self.output(preprocessing(text))
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 979, in output
    out += self.tok()
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 989, in tok
    return getattr(self, 'output_%s' % t)()
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 1048, in output_list
    body += self.tok()
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 989, in tok
    return getattr(self, 'output_%s' % t)()
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 1057, in output_list_item
    body += self.tok()
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 989, in tok
    return getattr(self, 'output_%s' % t)()
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 1048, in output_list
    body += self.tok()
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 989, in tok
    return getattr(self, 'output_%s' % t)()
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 1055, in output_list_item
    body += self.tok_text()
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 995, in tok_text
    return self.inline(text)
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 494, in __call__
    return self.output(text)
  File "/home/adam/SUSE/git/odpgen/mistune/mistune.py", line 529, in output
    output += out
  File "/home/adam/SUSE/git/odpgen/odpgenerator.py", line 196, in __iadd__
    self.add_text(other)
  File "/home/adam/SUSE/git/odpgen/odpgenerator.py", line 179, in add_text
    span.set_text(unicode(text))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 19: ordinal not in range(128)
make: *** [HA-training-autogenerated.odp] Error 1