Be smarter about encodings... actually pay attention to content-type instead of assuming everything is utf8