Locale-sensitive IO encoding in GHC 6.12

One thing to watch out for in the latest versions of GHC (6.12) is the new locale-sensitive text IO. For instance, when using EasyFilter to render Pandoc documents in WordPress, you must make sure you set the LANG environment variable to en_US.UTF-8 (e.g. in /etc/apache2/envvars), or it will typically default to POSIX and thus cause Pandoc to crash whenever it reads a non-ASCII character:

pandoc: <stdin>: hGetContents: invalid argument (Invalid or incomplete multibyte or wide character)

or writes one:

pandoc: <stdout>: commitAndReleaseBuffer: invalid argument (Invalid or incomplete multibyte or wide character)

Follow me on Twitter for stuff far more interesting than what I blog.