begriffs/heroku-buildpack-ghc — pull request #21 by jsl (2014-02-09 03:57:18+00:00)
Title: Add note on specifying UTF-8 character encoding in Haskell

When Haskell reads from System.IO it defaults to using the character encoding specified by the operating system [1]. Unfortunately it seems Heroku doesn't specify UTF-8 by default, so you can see encoding issues if you don't set an option in your VM. Using this command, which is also specified on the SBCL
buildpack README [2], fixed an encoding error that I experienced when reading UTF-8 files from the filesystem in a Haskell app. I think it's a good idea to include it in the README until Heroku defaults to UTF-8 at the OS level for character encoding.

I'll also forward this commit to Heroku support to see if they can shed some more light on their reasoning for not specifying character encoding since the default doesn't seem particularly intuitive or helpful for most applications.

1 - http://stackoverflow.com/questions/5286860/how-does-ghc-haskell-decide-what-character-encoding-its-going-to-decode-encode
2 - https://github.com/jsmpereira/heroku-buildpack-cl