From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Improve error reporting when serializing non-Unicode strings to JSON Date: Sat, 23 Dec 2017 17:00:43 +0200 Message-ID: <83r2rljxpg.fsf@gnu.org> References: <20171222210031.30811-1-phst@google.com> <83efnllufm.fsf@gnu.org> <83wp1dk18g.fsf@gnu.org> <83shc1jy3j.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1514041163 5873 195.159.176.226 (23 Dec 2017 14:59:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 23 Dec 2017 14:59:23 +0000 (UTC) Cc: phst@google.com, p.stephani2@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 23 15:59:19 2017 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 1eSlGg-00016a-CO for ged-emacs-devel@m.gmane.org; Sat, 23 Dec 2017 15:59:18 +0100 Original-Received: from localhost ([::1]:42261 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSlIe-0000jU-RY for ged-emacs-devel@m.gmane.org; Sat, 23 Dec 2017 10:01:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSlI5-0000jC-U6 for emacs-devel@gnu.org; Sat, 23 Dec 2017 10:00:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSlI2-0000Nm-TZ for emacs-devel@gnu.org; Sat, 23 Dec 2017 10:00:46 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSlI2-0000NR-Nz; Sat, 23 Dec 2017 10:00:42 -0500 Original-Received: from [176.228.60.248] (port=4050 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eSlI2-000594-2M; Sat, 23 Dec 2017 10:00:42 -0500 In-reply-to: <83shc1jy3j.fsf@gnu.org> (message from Eli Zaretskii on Sat, 23 Dec 2017 16:52:16 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:221379 Archived-At: > Date: Sat, 23 Dec 2017 16:52:16 +0200 > From: Eli Zaretskii > Cc: phst@google.com, emacs-devel@gnu.org > > Btw, doesn't find_charsets_in_text do the same job cleaner and > quicker? AFAIU, all you need is make sure there are no characters > from the 2 eight-bit-* charsets in the text, or did I miss something? Ah, I see you test the encoded string, so find_charsets_in_text won't do. But maybe find_charsets_in_text could be called on the original strings before encoding them, which would be even better?