kematzy / sinatra-cache

A Sinatra Extension that makes Page and Fragment Caching easy
MIT License
161 stars 21 forks source link

"ArgumentError: invalid byte sequence in US-ASCII" for utf-8 encoded templates #7

Closed anddon closed 12 years ago

anddon commented 13 years ago

I have found an issue with sinatra-cache not passing the :default_encoding to tilt, resulting in this error for utf-8 templates. The solution I found is to add options[:default_encoding] ||= settings.default_encoding to the render method in templates.rb

kematzy commented 12 years ago

Should be sorted now. Apologies for delay in fixing or addressing your issue.