[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: url-retrieve "Multibyte text in HTTP request" error when passing UTF
Re: url-retrieve "Multibyte text in HTTP request" error when passing UTF-8
Mon, 15 Jun 2020 00:30:33 +0700
On Sun, 14 Jun 2020 at 20:49, Stefan Monnier <email@example.com> 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.
> I didn't suggest to change the behavior, only to document it because
> both outputs can make sense, so common sense is not sufficient to know
> what should be returned.
Oh, I see. Yes please. More libraries should take care to document
their behavior wrt string encodings.