From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: master 0d7d09b: Test for error with multibyte strings in bindat.el Date: Thu, 22 Oct 2020 09:10:09 -0700 Message-ID: References: <20201022132026.11259.71984@vcs0.savannah.gnu.org> <20201022132028.35E5C209D4@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20594"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 22 18:11:01 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kVdB7-0005FV-M8 for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Oct 2020 18:11:01 +0200 Original-Received: from localhost ([::1]:59684 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kVdB6-0001F9-OR for ged-emacs-devel@m.gmane-mx.org; Thu, 22 Oct 2020 12:11:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49750) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kVdAL-0000jl-Od for emacs-devel@gnu.org; Thu, 22 Oct 2020 12:10:15 -0400 Original-Received: from mail-ej1-f53.google.com ([209.85.218.53]:38272) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kVdAJ-0002PU-LC for emacs-devel@gnu.org; Thu, 22 Oct 2020 12:10:12 -0400 Original-Received: by mail-ej1-f53.google.com with SMTP id ce10so3099431ejc.5 for ; Thu, 22 Oct 2020 09:10:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc:content-transfer-encoding; bh=XwXl0XgxORpQFu1Ck4ZVQL+lL3hAHPm8kOVc0kyXYx0=; b=TmW79YQ7NZHtUXpRSBr/VxxQJ69s6AWLSEsiUp0lUDedUQJG+ef0J/XSNtwGFpJBAF jyBIZ7V5bJqmA+19O1/Z7NkaaIwqRpQL0VEljDPvLGif7/TZCj6ivuxObjSiwxFSR30o arawDH6+bULPjhZZiMLLuIxljQ4SKr0s8Fiy3Vt12+pesC0HU86/vlw0e6TYlAh3/G1a PhvmerKW4JZ6rUZcMO4cuxwS7YiHPbREG8I3wQ1Tw+0dqX5Cclt5sK6mKAbLFxZVQ40h d8D4WCLchSfhaIH/g/8Fg1YHqkMTxL/oImefPUzo8jTMU6pKeTTcIXL+9IWCdOJXPzBI kcKw== X-Gm-Message-State: AOAM530h0slbGCGpsqTQNTGc2VrzzA7kFG46fzRBu7KO7cCGlOwHj9V7 9pyul8gCkth6KKqHqIZRiFoDeKMcgI7dKbPtEQg= X-Google-Smtp-Source: ABdhPJzW4+tL28OUECDdkNGTXg2AuXm7U3HyRAD7a3LrbiEW+aH58KtbtqB6cyxW6sKmNxTqWQeWEGMBg5uun9ogsmI= X-Received: by 2002:a17:906:3e4b:: with SMTP id t11mr2849129eji.420.1603383010000; Thu, 22 Oct 2020 09:10:10 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 22 Oct 2020 09:10:09 -0700 In-Reply-To: Received-SPF: pass client-ip=209.85.218.53; envelope-from=stefankangas@gmail.com; helo=mail-ej1-f53.google.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/22 12:10:10 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:258307 Archived-At: Stefan Monnier writes: >> + (should-error (bindat-pack nil nil (encode-coding-string "=C3=B6" 'ut= f-8)))) > > I don't understand this code: "=C3=B6" is a multibyte string, > i.e. a sequence of chars (and not a sequence of bytes), so you can > "encode" it to a sequence of bytes but "decoding" it makes no sense > (and should ideally signal an error, tho I think we currently refrain > from doing so). Ugh, sorry about that. I guess the fix is to just change this to: (should-error (bindat-pack nil nil "=C3=B6")) Correct?