From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: handa Newsgroups: gmane.emacs.devel Subject: Re: Mysterious use of string-as-multibyte Date: Mon, 15 Jan 2018 23:36:00 +0900 Message-ID: <87po6bmbov.fsf@gnu.org> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1516027177 27074 195.159.176.226 (15 Jan 2018 14:39:37 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 15 Jan 2018 14:39:37 +0000 (UTC) Cc: handa@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jan 15 15:39:32 2018 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 1eb5v6-0006OO-IO for ged-emacs-devel@m.gmane.org; Mon, 15 Jan 2018 15:39:28 +0100 Original-Received: from localhost ([::1]:39848 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eb5x5-0000jn-Sp for ged-emacs-devel@m.gmane.org; Mon, 15 Jan 2018 09:41:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eb5rz-0004ch-CZ for emacs-devel@gnu.org; Mon, 15 Jan 2018 09:36:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eb5ry-0001Hl-63 for emacs-devel@gnu.org; Mon, 15 Jan 2018 09:36:14 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eb5rp-0001Eg-PC; Mon, 15 Jan 2018 09:36:05 -0500 Original-Received: from fl1-119-240-91-176.iba.mesh.ad.jp ([119.240.91.176]:35994 helo=shatin) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1eb5rp-0002ra-1Q; Mon, 15 Jan 2018 09:36:05 -0500 Original-Received: from handa by shatin with local (Exim 4.86_2) (envelope-from ) id 1eb5rl-00016z-2H; Mon, 15 Jan 2018 23:36:01 +0900 In-Reply-To: (message from Stefan Monnier on Thu, 11 Jan 2018 11:04:39 -0500) 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:221973 Archived-At: In article , Stefan Monnier writes: > Do you remember why you added the call to string-as-multibyte in the > patch below? [...] > - (when smtpmail-code-conv-from > - (setq data (encode-coding-string data *internal* smtpmail-code-conv-from))) > + (if (and (multibyte-string-p data) > + smtpmail-code-conv-from) > + (setq data (string-as-multibyte > + (encode-coding-string data smtpmail-code-conv-from)))) > (if smtpmail-debug-info > (insert data "\r\n")) I don't remember, sorry. By guessing from the code, that change is to make DATA a multibyte string so that the encoding done by the following process-send-string produces the correct byte sequence. Perhaps, the change was done before the introduction of string-to-multibyte which is more suitable for that purpose. --- K. Handa handa@gnu.org