unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: "Dmitry Gutov" <dgutov@yandex.ru>,
	"Iñigo Serna" <inigoserna@gmx.com>,
	"Emacs developers" <emacs-devel@gnu.org>
Subject: Re: url-retrieve "Multibyte text in HTTP request" error when passing UTF-8
Date: Sun, 14 Jun 2020 09:49:04 -0400	[thread overview]
Message-ID: <jwvpna1yd0o.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAP_d_8VrDOTOVMN9yTgKip-uaGP_aL6aKsHEb-j4V+BRjJy70g@mail.gmail.com> (Yuri Khan's message of "Sun, 14 Jun 2020 15:33:04 +0700")

>> 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




  reply	other threads:[~2020-06-14 13:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-13 21:08 url-retrieve "Multibyte text in HTTP request" error when passing UTF-8 Iñigo Serna
2020-06-13 22:12 ` Dmitry Gutov
2020-06-13 23:24   ` Iñigo Serna
2020-06-13 23:27     ` Dmitry Gutov
2020-06-14  0:20     ` Stefan Monnier
2020-06-14  8:33       ` Yuri Khan
2020-06-14 13:49         ` Stefan Monnier [this message]
2020-06-14 17:30           ` Yuri Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvpna1yd0o.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=dgutov@yandex.ru \
    --cc=emacs-devel@gnu.org \
    --cc=inigoserna@gmx.com \
    --cc=yuri.v.khan@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).