From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: bug#23750: 25.0.95; bug in url-retrieve or json.el Date: Wed, 30 Nov 2016 18:23:14 +0000 Message-ID: References: <6d0c8c2e-8428-2fdb-0d6e-899f7b9d7ffd@nifty.com> <8053af81-80e1-a24a-f649-8ffc86963ed5@nifty.com> <0cc7fab4-9a2c-6a8d-def7-36bd50317ca3@yandex.ru> <7f9a799f-de88-fd78-0cdc-dac0928f1503@nifty.com> <308bb78f-8be3-092d-d877-e129d340242b@nifty.com> <4dc615e7-ec73-60a5-426e-0d6986f15d76@yandex.ru> <0cb406fb-ffc4-a4ad-557a-2cacc99b8e75@nifty.com> <86ccb4af-5719-c017-26bb-fc06b4c904d2@yandex.ru> <83r35uxkr5.fsf@gnu.org> <4e12d4ad-cd6b-3087-5d7c-449d4c1886e2@yandex.ru> <83lgw1q9uu.fsf@gnu.org> <83eg1tq8is.fsf@gnu.org> <787e5206-53e0-752f-a339-4608d2f7ad39@yandex.ru> <8360n5q6j4.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f46d0444ea69fbe511054288cc90 X-Trace: blaine.gmane.org 1480530314 437 195.159.176.226 (30 Nov 2016 18:25:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 30 Nov 2016 18:25:14 +0000 (UTC) Cc: emacs-devel@gnu.org, kentaro.nakazawa@nifty.com, dgutov@yandex.ru To: Eli Zaretskii , Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 30 19:25:09 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cC9Z6-0007gn-Gc for ged-emacs-devel@m.gmane.org; Wed, 30 Nov 2016 19:25:08 +0100 Original-Received: from localhost ([::1]:45586 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC9ZA-0006a4-6U for ged-emacs-devel@m.gmane.org; Wed, 30 Nov 2016 13:25:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC9YY-0006JO-K3 for emacs-devel@gnu.org; Wed, 30 Nov 2016 13:24:38 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC9YV-00025f-0O for emacs-devel@gnu.org; Wed, 30 Nov 2016 13:24:34 -0500 Original-Received: from mail-wj0-f182.google.com ([209.85.210.182]:33584) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cC9YQ-00024r-NO; Wed, 30 Nov 2016 13:24:26 -0500 Original-Received: by mail-wj0-f182.google.com with SMTP id xy5so183386886wjc.0; Wed, 30 Nov 2016 10:24:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=P1Hhl2avJk9M3wlZAip/V2qQZKtCBe8TenazPT4vO00=; b=RRIIMEofW/MpoV0aqwJQr5etDgPEPUGf3EMPnWUDsnTN9BE7MhE/7wshxSvqC4bXIv NFR0bhKDthe6OnDoRU+vr9behUhmzLbaU14RdWtcTAxTfeouE8oNsv578Zqxia9UX4/R j7Db/FBz50i8OFdOqhBE2KVIZSME4mBrGC9TW1tgQEuy/rnRgGqCx9xekSqwQSD07/m2 J8OjCW1IQWQiLO+9Pk/bmv9uXLWDTZI6Hbae6Kjgml4WtFDQS1PGaQfmr6V3VeKsOnCT oMDyJd3yZKJ2TCPhryZaoxS3Ju3m4APfmcvLzqQEV84ItwRIVBeufWAnblUvcAKbJZL4 FyfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=P1Hhl2avJk9M3wlZAip/V2qQZKtCBe8TenazPT4vO00=; b=HwVap0x+2vMYZYj9oStp5VRXQW5YlmfnmTcR1a7w+i+t186P7Bs5JXgIrKNpjF34xB 3X+acYiIof6sf+wXhfUuWY3L5NJf4FP4gmiS+qxEfP8JLN3f/xiK/DjznzCu/dUN0Hiy Ht8eJ6uuGF95xH+5SqOP/rcqkPokIm6ENrD/VDrTNPLGSbO/CGW7xL7dvdBRKOguzgwN nmgXJJ4Pb9vRyvYag13RibqzKj/xaEV2kS7aizfhb5gQaucEpLuQuJC2iPClWM4h9ArK BJHNaJjbap91YSwLzTJh7kG3GhQCyTR7RL79WaOSAGTID2hgTdHRrLtbvAwjKLUZ0vY+ 4PiA== X-Gm-Message-State: AKaTC005F4VhgWBpJHfmpWnBiG45o0WvbX76oZzcCc69bcr0lPDCWkb3uxz4RmcIpWIHvzYuE51ODXBVulTn9Q== X-Received: by 10.194.18.196 with SMTP id y4mr30614863wjd.73.1480530205596; Wed, 30 Nov 2016 10:23:25 -0800 (PST) In-Reply-To: <8360n5q6j4.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.210.182 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:209823 Archived-At: --f46d0444ea69fbe511054288cc90 Content-Type: text/plain; charset=UTF-8 Eli Zaretskii schrieb am Mi., 30. Nov. 2016 um 17:25 Uhr: > > From: Lars Ingebrigtsen > > Cc: Eli Zaretskii , p.stephani2@gmail.com, > kentaro.nakazawa@nifty.com, emacs-devel@gnu.org > > Date: Wed, 30 Nov 2016 16:48:09 +0100 > > > > Yes, this is not a json.el problem at all. It does the correct thing, > > and shouldn't be changed. > > ??? Why should any code care whether a pure-ASCII string is marked as > unibyte or as multibyte? Both are "correct". > I guess the problem is that process-send-string cares. If it didn't, we wouldn't have the problem. For URL, we'd need functions like (byte-array-length s) = (length (string-to-unibyte s)) (process-send-bytes s) = (process-send-string (string-to-unibyte s)) (conceptually; process-send-string also does EOL conversion, which should never be done for HTTP bodies.) --f46d0444ea69fbe511054288cc90 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Eli Za= retskii <eliz@gnu.org> schrieb am= Mi., 30. Nov. 2016 um 17:25=C2=A0Uhr:
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>,=C2=A0 p.stephani2@gmail.com= ,=C2=A0 kentaro.nakazawa@nifty.com,=C2=A0 emacs-devel@gn= u.org
> Date: Wed, 30 Nov 2016 16:48:09 +0100
>
> Yes, this is not a json.el problem at all.=C2=A0 It does the correct t= hing,
> and shouldn't be changed.

??? Why should any code care whether a pure-ASCII string is marked as
unibyte or as multibyte?=C2=A0 Both are "correct".

I guess the problem is that proce= ss-send-string cares. If it didn't, we wouldn't have the problem.
For URL, we'd need functions like
=C2=A0 (byte-array= -length s) =3D (length (string-to-unibyte s))
=C2=A0 (process-sen= d-bytes s) =3D (process-send-string (string-to-unibyte s))
(conce= ptually; process-send-string also does EOL conversion, which should never b= e done for HTTP bodies.)=C2=A0
--f46d0444ea69fbe511054288cc90--