File: HAML_REFERENCE:

The encoding to use for the HTML output. Only available in Ruby 1.9 or higher. This can be a string or an Encoding Object. Note that Haml does not automatically re-encode Ruby values; any strings coming from outside the application should be converted before being passed into the Haml template. Defaults to Encoding.default_internal ; if that’s not set, defaults to the encoding of the Haml template; if that’s us-ascii , defaults to "utf-8" . Many Ruby database drivers are not yet Ruby 1.9 compatible; in particular, they return strings marked as ASCII-encoded even when those strings contain non-ASCII characters (such as UTF-8). This will cause encoding errors if the Haml encoding isn’t set to "ascii-8bit" . To solve this, either call #force_encoding on all the strings returned from the database, set :encoding to "ascii-8bit" , or try to get the authors of the database driver...