bast / cicero

:microphone: Serving presentation slides written in Markdown.
https://cicero.xyz
GNU Affero General Public License v3.0
55 stars 17 forks source link

Does not work with ANSI encoding #54

Closed arnfinn closed 6 years ago

arnfinn commented 6 years ago

I am not sure if it is a big deal, but I get an "Internal Server Error" if the md-file is encoded with ANSI (windows). It is probably only a problem if the file contains special characters (like Norwegian letters). See example below.

With ANSI encoding: http://cicero.xyz/v2/remark/github/arnfinn/presentasjoner/master/ansi.md

With UTF-8 encoding (the same presentation): http://cicero.xyz/v2/remark/github/arnfinn/presentasjoner/master/utf8.md

v3 also does not work: http://cicero.xyz/v3/remark/0.14.0/github.com/arnfinn/presentasjoner/master/ansi.md

bast commented 6 years ago

Thanks! I will look at it. We better be Windows compliant now :-)

arnfinn commented 6 years ago

I found out about this MS-shit just after I submitted this issue, so not related:)

bast commented 6 years ago

Confirmed. Thanks for the good test case.

bast commented 6 years ago

So the local preview is easy to fix but the URL view is more difficult to fix because the URL response tells me that encoding is UTF-8. See also here: https://cdn.rawgit.com/arnfinn/presentasjoner/623b8f50a220f18753b4418ccb06489b5376c657/ansi.md

Does this look good on your side?

arnfinn commented 6 years ago

Looks like this, so I guess not looking good: image

bast commented 6 years ago

Same here. So cicero already receives this with wrong encoding and then it will also show the question mark. But at least it will not crash so I will submit the patch. Local preview seems to work fine (after upcoming patch).