Fix encoding related bugs.

In particular, force our prefered encoding in the connection rather than
rely on whatever the server setup is: we know babel can handle utf8.