anilgulecha/trelby — comment on commit 4c13588c576fb13022811265c7a6da31e72040bc
File: src/watermark.py line 95
By oskusalerma:

Always remember to test with non-ascii characters. This is buggy:

Traceback (most recent call last):
File "/home/osku/trelby/work/src/watermark.py", line 95, in OnOK
if not util.writeToFile(fn, pdfdata, self):
File "/home/osku/trelby/work/src/util.py", line 882, in writeToFile
f = open(misc.toPath(filename), "wb")
File "/home/osku/trelby/work/src/misc.py", line 73, in toPath
return s.encode("UTF-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 12: ordinal not in range(128)