arjunguha/haskell-couchdb — pull request #12 by nandykins (2012-08-20 22:12:20+00:00)
Title: Proper UTF-8 encoding

Currently, CouchDB uses the String API of HTTP, which internally mangles UTF8 by using the .Char8 interface.

There seems to have been a workaround attempted for this by passing a pre-encoded “String” instead; but apparently CouchDB rejects this - it fails with a 400 Bad Request whenever I try passing it JSON data containing unicode.

I've fixed it by switching to the ByteString API instead and setting the appropriate Content-Encoding headers.