[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: url-retrieve "Multibyte text in HTTP request" error when passing UTF
From: |
Yuri Khan |
Subject: |
Re: url-retrieve "Multibyte text in HTTP request" error when passing UTF-8 |
Date: |
Sun, 14 Jun 2020 15:33:04 +0700 |
On Sun, 14 Jun 2020 at 07:21, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> This might beg for some better documentation about the string returned
> by `json-encode`. After all, AFAIK the JSON format requires utf-8
> encoding, so it would make a lot of sense for `json-encode` to do the
> utf-8 encoding directly and make sure it always returns a unibyte string.
An application might not want to send the encoded string over the
network right away. It might want to insert it into a buffer.
It would make a lot of sense for people who deal with files, sockets
and network protocols to also deal with encoding, while people who
deal with strings and buffers use JSON-serialized strings
transparently.