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 02bca34: Utilize new string decoding feature in GTK native input Date: Sat, 19 Feb 2022 18:09:38 +0800 Message-ID: <87y227mal9.fsf@yahoo.com> References: <83czjjyzao.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="1935"; 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 Sat Feb 19 11:21:44 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 1nLMs2-0000Ik-Jq for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Feb 2022 11:21:42 +0100 Original-Received: from localhost ([::1]:60398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nLMs1-0000eg-1Z for ged-emacs-devel@m.gmane-mx.org; Sat, 19 Feb 2022 05:21:41 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:41068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nLMqk-0008Ii-6p for emacs-devel@gnu.org; Sat, 19 Feb 2022 05:20:22 -0500 Original-Received: from sonic307-56.consmr.mail.ne1.yahoo.com ([66.163.190.31]:34759) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nLMqE-00073R-PC for emacs-devel@gnu.org; Sat, 19 Feb 2022 05:20:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1645265987; bh=4hePljroZl2iQEvDkfRzQq+BL914M93mxfnROJ2wesY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=lTFdvvn6fcXcrivQj+9Xr8UQyvV5tekMI0tzN93WMhPqsVKY0jXUEEjmiDjS/oqGujoKkiXg/OiWWdPIRav5dTeYx2XrYXRUplMvMH4Tko/isuxTpT0zd20J2M2mIAV3YUpb+2gC7HnG/+nFvYxm3G3sK0n/jYYYrTndVNWEavMisacIBL22hlApP34N2TJCj29qHw3j/CabWt5GGNywyfcYa7X4kq4LC06sv6Fnc+p39NQMMMlFzumUHKOX0iy1L2cQcrB6mDS9++67ncqReaoA520QAJYFm9Gpf/x87+kN/7owdYugmcw0GAi8cWVEfx0vb8VKGGidXXd6gFB1jg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1645265987; bh=4GeGqEmVMxm3wDtSlTzTQC8+Rew69bgnpfrGTq2PnjZ=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=daQ/FvvIBw+8gFdUwRWcTleodV/4J3wYpsBfCFSkR7fsiHyatZfe9mplCmvSm51ITuE8Rw5RAIngSJSM5Be69aySoHAVk7KccDsEWzGsGckGXQwpjTEqlOfM0UxRwaDYn3KoE3xm5Kr/vJH+gbctKi50U2JIGOJoywb0BsZDOZ5OGSpasUld+PawH34iNnX7dhOSP5khBl8LIf3oibGUWlbBSTJWP7bRAc9bK7VHIzW29FMvPBMozsuNtHidKddL8a3RtD++aD3jsBOucaBjBKoEgQeU8M2YHlrwChA70934ysaMtlKmFZCy3+QALYO5iN2koT29/W53NkqTYsfmVg== X-YMail-OSG: R2FJWq4VM1l..75lxoydbcUkO_WxJyn8_OXy46KYf31UjCBqpK8qd5oNGzyt2gU mE0x1KPvW5RIKcwhZY4exWWJO_KmdzkuUyp5IVlNtOZvPRv0orHAd6hdX0m8uUNPkVScuQR_rCOX q.uLwPu1G6SdxnetYUlDbQZWWCzaI91NTYnwjSqGbf_1LSQSjGDL86jV9sGoUIUzIonN0lE6cqjb i5RKul_FmZzIdutoSH4OGVzf47aoSavui8cVyRaKMw2rywqeBOqzag.QW9IJTMM4pYCvCtXNbryl HeYGCiTFqqw_YeCnaUfsEzz6Dcw7RLRui87dUhYQCQOGwOCVEuAcAYYw2hKgceeQTsvCfR5q1Yr_ f.kwMsqh0lNn3pqw9XDpImx3vKs3MSMy1L_WhvctXiawedCXPfZ3HlIsMLA1QBhdqThTyqp1gB35 5XZ.mpFLPA59ze1_DwidRUC9l9uOQyc18qkz1VjxYoA_2s.yZXz7GsrYq4XfrUfkvak78rkJiBnb gVYoqiknPxNYPW7xQNtFPBwGp4aOJXABpvpu.zH.ptnfSzZRdGPkoY99EsnsBY6DSJqJOZytj0Vk PSYcvbd6Dq6Fj.XjJ76vmPOp3ZmFgcB2fFOqF4KyYDdRZlwkfrygfvUEmeiGDBWhKrUpDGkca4GH eZA.rnvR94L6R8SVDu7sNNm8vNCVlVqv9dYBT4XE0b8jkzqe0YMerkuD1VZs21G_TP9o.Txfk8EE z8pcrN6zrMvH8UHWvuweMaVWAjQCBr.PmcDp08Ggq50M2w03Uvsaz.htyjbXDNI3ohiq1iDBuQgR HJoZhVTDkRY1v.TGQ2ef14n6DV.w1.0_nB.AXDmWZ4 X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.ne1.yahoo.com with HTTP; Sat, 19 Feb 2022 10:19:47 +0000 Original-Received: by kubenode504.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID edae89daab690566fb6d0c8597049f0f; Sat, 19 Feb 2022 10:09:42 +0000 (UTC) In-Reply-To: <83czjjyzao.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Feb 2022 11:35:11 +0200") X-Mailer: WebService/1.1.19797 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.190.31; envelope-from=luangruo@yahoo.com; helo=sonic307-56.consmr.mail.ne1.yahoo.com X-Spam_score_int: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 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, GUARANTEED_100_PERCENT=2.699, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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:286459 Archived-At: Eli Zaretskii writes: > Is this a good idea? Consing a string when we process input increases > GC pressure, and what issues does this change solve as a > counter-weight for that disadvantage? Is g_utf8_to_ucs4 a problematic > API or something? No, but some input method modules don't always return valid UTF-8 like they're supposed to, thereby causing crashes in g_utf8_to_ucs4_fast. I should have explained that in the commit message. > But in general, decoding UTF-8 encoded C string is better done without > consing a string and then using the coding.c stuff. After all, if the > original string is 100% guaranteed to be in UTF-8, the decoding is > almost trivial. It's supposedly guaranteed, but some input method modules break that guarantee. Thanks.