Closed jcoglan closed 12 years ago
I don't think this is the best approach. Enforcing UTF-8 is not the way to go, imho. However, having an encoding option in the showoff.json
file seems like a good idea to me.
Done. App now has an encoding
setting in my branch. I went with this over a field in showoff.json
this because this makes it easier to configure many decks at once if hosting several on the same host, e.g. see https://github.com/jcoglan/presentations/blob/master/config.ru#L4-11
Why can't they co-exist?
I'm thinking about the folks that know nothing about Sinatra/Rack and just want to run a simple presentation in UTF-16?
See latest commit -- encoding is read from showoff.json
but can be overridden through the class API.
Nice, thanks!
If you try to serve a Showoff deck under nginx+passenger, you get this when trying to load the slides:
This patch forces the Markdown content to UTF-8 encoding to stop the error.