Fix to correctly encode JSON responses as UTF-8.