From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: master 6011d39b6a: Fix drag-and-drop of files with multibyte filenames Date: Sun, 05 Jun 2022 18:00:10 +0800 Message-ID: <87y1ybzaz9.fsf@yahoo.com> References: <83r143a2j3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8692"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Jun 05 12:06:19 2022 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 1nxn9G-00025p-M0 for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Jun 2022 12:06:18 +0200 Original-Received: from localhost ([::1]:47054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nxn9F-0002mP-6O for ged-emacs-devel@m.gmane-mx.org; Sun, 05 Jun 2022 06:06:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nxn3b-0001Gy-LA for emacs-devel@gnu.org; Sun, 05 Jun 2022 06:00:29 -0400 Original-Received: from sonic302-21.consmr.mail.ne1.yahoo.com ([66.163.186.147]:42346) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nxn3a-0004Dh-2Y for emacs-devel@gnu.org; Sun, 05 Jun 2022 06:00:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1654423223; bh=M5VyEm/Xc6VdHqunXsNJm2WQnEW3hAbfqAS07Bo/mSY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=BJTwDhkxr2+FbX3m5sLE59pIGExpzDkNjtQWYzx3satGI+sa80XI6M0A481Yt6rRnGZtF29JHHP3LGPANoJiXtaTeiAaoeoenO8YRug2H3nCoX7aAsVwGtrTGJzNiVQ4Q4QRLgpH0R0ATaKuCXvHxV1wKRUE9fDKET3CVqUvrj9Y5fJcX3kl8WEOFh8CX1KWh/rR3jL59CAhiALQ8j1LCL/HeEJJzNCYcHI30d+8Hoebe5xxkIEQVElRxTniQUxw5ikZ2/NWfjLJafzLonGGrpq9pCTfq2+seG15qLX2sH8QbqgQwK5mU+JXWtOjvWXGeDcUcxoO++Ezua8IJty/iQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1654423223; bh=iQBbYVfCObT5fIm7Vo/KicgQYbuJugCKFgB+TRAxFNe=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=me+QuTqMCSJVeE+B48H8wiT+J+cNxmE5F2E6296PVR9YAYncjlZrkUOZ3dmLOuGrY8CJ5BtJPLsh7OIdTtiHw0BZCectdGIoxrFR+2uknhNwM9Ga3hgwJkhi7oxYhHiCVcb5CwRWopVPo4xTjdyCc8fX0UAU1oR5xIRzzZG+YzxfVQBfJ5xvHUhcHBSzsoCtaFjUw+eaR61FU7evTvBXPH4AerUlyko5QU0y8ULAZ4nzjEb+4ftzzZf9stDdHBGqj/GUdqb7uw1IG2KF7ZIzBWEYHMPauG8HKsWqFYWlnPPhN41nnfiVWlmTwX6/BD9vqI4RcNWM3fJ80jH8EDAa/A== X-YMail-OSG: 3HB0a5QVM1mln46ENvfGEnqZjpD_UwBuTMSUEoXPesJlajqmMTOrd3KqZ3GNY1P LfgF6EK8imLsFKl_PVMTwTcizvx3gNA.KJi.ay4s7_nS1OTWECZwZXj7cGEtSZ2uSwikW5mdUMgq _UvW.o6mlUIXamdXmLAAiVGElE83r5se_45AGau6Atp90MqwoX26iRtxKcbOz5lOTFlT5TMLjb6K nG7HDytJdRdHHBnND3jS5d_ZFkGXO47Z117caM8c4UZazOGtk5cIjMl_nhmD0q.gil0m8aqOPEyC .K3de7gcztMSAPo_ev4xcgIAXo2HGF1Z8CySKvu7Mx.RZWbLprT4X.JCg3YWhYFyNwfik_0ium.y seXKW9PzNi5E3WFEiK3bz_tmPp8xY2fpIaL_QqMZaleNXEDCFkmsauYcrfJlqzzKxeWKIrm3wMjt 9PoRlzivWz3eSNE9RmTznxrs9A0srHo1ofGsYbjUzxHkcowVlaFe70.YwXeP9NnFdtSos2nnbdg. RmPl3WEx8Sln6yXQyrYx98..dsh3xFlBHzq8sfm1AUbjBc6Svtl5AUwMfCTQ.kJQw_duFyFT79NU DVbz3w4.YHkEA2tX0T4an0IF7tZB2fdNUqMZDTcBflVKDEHzlza_kOeRdPD71WInHFIzRXKdNooi IYE_dsztruROBBZUFYQSaSEQ7PgCqx0SfJWAxtLlu7LT3M1q3DB8ZxixYfhEwRU4r_OnC16dxVRV HjjsyP2IErjLpgARZV4O9y9crq4LgUiJPBxdOUDX4ytuMpnPHQxLmj39mJCeC.LY0Snwwuf68xcM oE0AQYvzIF3EBxyVz6QB77Rmyate8CxRibc77fY6rg X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ne1.yahoo.com with HTTP; Sun, 5 Jun 2022 10:00:23 +0000 Original-Received: by hermes--canary-production-sg3-5f7658c994-q45vr (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1ce1c3557d6facb866e2dccde84e04aa; Sun, 05 Jun 2022 10:00:16 +0000 (UTC) In-Reply-To: <83r143a2j3.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 05 Jun 2022 12:21:52 +0300") X-Mailer: WebService/1.1.20225 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.186.147; envelope-from=luangruo@yahoo.com; helo=sonic302-21.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:290683 Archived-At: Eli Zaretskii writes: > I don't think I understand this change. raw-text basically doesn't do > any conversion, except if the text includes raw bytes. Is that the > problem here, and if so, how come a file name can include raw bytes in > its name? Encoding it as `raw-text-unix' is to satisfy the requirement in xselect.c that strings returned by selection converters must be unibyte. IOW, it's the same as (string-as-unibyte (expand-file-name value)) except that we can't use `string-as-unibyte', because it's obsolete. > And what does "Motif expects this to be STRING, but it treats the data > as a sequence of bytes instead of a Latin-1 string" mean in this > context? The difference between raw bytes and Latin-1 strings is only > meaningful to Emacs; how does Motif distinguish between them? The selection property type STRING means a Latin-1 string, with some minor extensions. See this paragraph under "TEXT Properties" in the ICCCM: STRING as a type or a target specifies the ISO Latin-1 character set plus the control characters TAB (octal 11) and NEWLINE (octal 12). The spacing interpretation of TAB is context dependent. Other ASCII control characters are explicitly not included in STRING at the present time. But Motif doesn't comply with the ICCCM meaning of STRING or use the generic TEXT type when converting a drag-and-drop selection to FILE_NAME. It instead expects the type of the selection property to be STRING, but the data is treated as raw bytes.