[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: |
Stefan Monnier |
Subject: |
Re: url-retrieve "Multibyte text in HTTP request" error when passing UTF-8 |
Date: |
Sun, 14 Jun 2020 09:49:04 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> 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.
Stefan