From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Kentaro NAKAZAWA Newsgroups: gmane.emacs.devel Subject: Re: bug#23750: 25.0.95; bug in url-retrieve or json.el Date: Tue, 29 Nov 2016 20:12:37 +0900 Message-ID: <7a3757b2-139f-755c-f417-c3f26bccd47a@nifty.com> 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1480418019 28068 195.159.176.226 (29 Nov 2016 11:13:39 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 29 Nov 2016 11:13:39 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 Cc: emacs-devel@gnu.org To: Dmitry Gutov , Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 29 12:13:35 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 1cBgLu-0006hy-Sg for ged-emacs-devel@m.gmane.org; Tue, 29 Nov 2016 12:13:34 +0100 Original-Received: from localhost ([::1]:36099 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBgLy-0002ua-Gr for ged-emacs-devel@m.gmane.org; Tue, 29 Nov 2016 06:13:38 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cBgLR-0002uK-2t for emacs-devel@gnu.org; Tue, 29 Nov 2016 06:13:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cBgLN-0000jB-22 for emacs-devel@gnu.org; Tue, 29 Nov 2016 06:13:05 -0500 Original-Received: from conssluserg-04.nifty.com ([210.131.2.83]:32495) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.71) (envelope-from ) id 1cBgLM-0000bk-Dn for emacs-devel@gnu.org; Tue, 29 Nov 2016 06:13:00 -0500 Original-Received: from [192.168.0.5] (nfmv001097188.uqw.ppp.infoweb.ne.jp [222.158.160.188]) (authenticated) by conssluserg-04.nifty.com with ESMTP id uATBCb1P019740; Tue, 29 Nov 2016 20:12:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com uATBCb1P019740 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1480417958; bh=0p4b4K+wsAciefNq+F92CwvN0ova/DWlxyppnTSdnmQ=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=1a0EK7iTaIkQNhfkb4ZYgfzBO37mMQgRkPzMkfQK6S79+gQ2P+uISIPmLyBip+1Tz ziMblSmC8j1kK5086TjXY1Wq4M8NOXsmeqwsXCMWAk42dTlOYOAk84VhITzMo/UAKD 82cnD/vFnYeYmxPSZu1Qo9p5OToOl0AQO+snMRsuTqDzpqPznv4rJirHmcwW9w+vmH Fx5jC55BEp1Wu28OVtCCtTG5B25Ry18Gwwh5uQHFclu0fOJuc7bt42H8BWy8WRf1Jm xBY5oLpNKyCvvxSLrfE1NKEw4qyFNOBmxdsQVa6+5twzj8h98/WKhWym/u1kbWlIwv gl3ckevrLWLzA== X-Nifty-SrcIP: [222.158.160.188] In-Reply-To: <86ccb4af-5719-c017-26bb-fc06b4c904d2@yandex.ru> X-MIME-Autoconverted: from 8bit to quoted-printable by conssluserg-04.nifty.com id uATBCb1P019740 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 210.131.2.83 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:209727 Archived-At: On 2016/11/29 20:05, Dmitry Gutov wrote: > json-encode returns a multibyte string. Try this: It worked! Thank you for telling me the correct code! I confirmed the correct result below. (let* ((content "=E3=81=BB=E3=81=92 <- VALID utf-8 Japanese multibyte tex= t") (url "https://api.github.com/gists") (url-request-method "POST") (url-request-data (encode-coding-string (json-encode `(("description" . "test") ("public" . false) ("files" . (("test.txt" . (("content" . ,content))))))) 'utf-8))) (with-current-buffer (url-retrieve-synchronously url) (when (url-http-parse-headers) (search-forward-regexp "\n\\s-*\n" nil t) (browse-url (cdr (assoc 'html_url (json-read)))))))