Attempt to fix #210: use the server-reported encoding.