From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: bug#23750: 25.0.95; bug in url-retrieve or json.el Date: Sat, 03 Dec 2016 11:00:42 -0500 Message-ID: References: <6d0c8c2e-8428-2fdb-0d6e-899f7b9d7ffd@nifty.com> <4e12d4ad-cd6b-3087-5d7c-449d4c1886e2@yandex.ru> <83lgw1q9uu.fsf@gnu.org> <83eg1tq8is.fsf@gnu.org> <787e5206-53e0-752f-a339-4608d2f7ad39@yandex.ru> <837f7lq6lg.fsf@gnu.org> <83bmwvpo0o.fsf@gnu.org> <04e2da4e-1fa3-4483-459c-32f272378486@yandex.ru> <8508920e-097f-0b2a-0558-49973ea0def6@yandex.ru> <765199a5-1ca1-da30-9414-93b40f9406d6@yandex.ru> <837f7hmnxn.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1480781126 26700 195.159.176.226 (3 Dec 2016 16:05:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 3 Dec 2016 16:05:26 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 03 17:05:20 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 1cDCoR-0005lp-9L for ged-emacs-devel@m.gmane.org; Sat, 03 Dec 2016 17:05:19 +0100 Original-Received: from localhost ([::1]:51616 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDCoV-00082P-9E for ged-emacs-devel@m.gmane.org; Sat, 03 Dec 2016 11:05:23 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cDCoP-00082G-7e for emacs-devel@gnu.org; Sat, 03 Dec 2016 11:05:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cDCoK-0005GJ-9a for emacs-devel@gnu.org; Sat, 03 Dec 2016 11:05:17 -0500 Original-Received: from [195.159.176.226] (port=35806 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cDCoK-0005Fr-3K for emacs-devel@gnu.org; Sat, 03 Dec 2016 11:05:12 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1cDCoD-0003p2-1K for emacs-devel@gnu.org; Sat, 03 Dec 2016 17:05:05 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 10 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:YgpSLACCJ9K9hrjXWA36Dfvgp0g= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:209983 Archived-At: > Just use `string-bytes' instead of `length'. IIRC the problem with that is if the string is the result of concatenating a unibyte and a multibyte string, in which case the string may only contain bytes (and hence `length` gives the right result) yet `string-bytes` and `length` will return different results (because the ≥128 bytes are encoded as 2 bytes in the multibyte representation). Stefan