emacs-devel
[Top][All Lists]
Advanced

[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: Mon, 15 Jun 2020 00:30:33 +0700

On Sun, 14 Jun 2020 at 20:49, 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.
>
> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]