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 e4e1e268c8e 2/2: Set a default locale on Android Date: Fri, 08 Dec 2023 14:49:35 +0800 Message-ID: <87edfxmbnk.fsf@yahoo.com> References: <83sf4d2894.fsf@gnu.org> <83il5919fo.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="33671"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 08 07:50:40 2023 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 1rBUh5-0008Xy-PO for ged-emacs-devel@m.gmane-mx.org; Fri, 08 Dec 2023 07:50:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rBUgI-0002t3-Gz; Fri, 08 Dec 2023 01:49:50 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBUgH-0002sg-Ah for emacs-devel@gnu.org; Fri, 08 Dec 2023 01:49:49 -0500 Original-Received: from sonic310-23.consmr.mail.ne1.yahoo.com ([66.163.186.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rBUgF-0006VM-Gv for emacs-devel@gnu.org; Fri, 08 Dec 2023 01:49:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1702018185; bh=BEC0VNxsUrVsh3damo8RHTHrHs00VG5XFnARFbBBbH4=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=ZZZW3sECG5MuhNJKqKGi9yi4ryZTtlTi9VaqjyDqijRHc0NaurpYKLDe50tP3WZg/M5Fk/g0lfJVfnDoHTfN36uCNEiHCGQE/5fzEQqVpuaGMfaPA8OZtbocT1/GN09q21bR7zNSko1lggFu+8HoaOy/SO4jN6UUuLhHv9RYtFibBwrf1KyRiI1WfM7lURehNnTlM4PzmHe26gd1Al66p2lh5vdJu7NxjExv99XJ2qHoyYjIMD5mPOgXQUOv9MR0iQ/8m13SXCW2NlCIRP/PB19cGQzoYm4dQpCWpBGKmUYzLjwRyJrNvkrLUvdRlKK54k9NLa0alnMiovKQUCF6xA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1702018185; bh=OEB4Gsa9lZnXSXW/WpxJdgvqALngblwuH9nNON/zckJ=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=dEyszX4Rk0TrUt5JEXEdDblo/sRk0IlOhqY2rUoqOGXNpISjeV/SlC6easEWHD8ax/qfItqtJIgVqlW8tUG3zmsKiN8s3aUw735WGQLVIXWeGI2TOZNtIgs47WuVZuPsxr6/TmoJjsDxPyep+YXRKXN8tXQSM7Krse48t8jQDav0JW8ZrdHQkrR6KfVAhAln5zfSNaN7POy8+aOsJ47WbJ7lth1N7PpCiGaD8FAnEITS6WFOXAt8BxM8SHpHqAyi7xrA1Wbio3PgZDo6DzhZ4u+blOVOKVmraxDj8CGHDme+4x1ikYb1ahfvynt0bNgd6ZkfatxD+RrGXemBTtmRhg== X-YMail-OSG: ALiDkJkVM1l96L1DxSv0uQc45l3o.kBuj4uTJ51YCOwBqeasD9XqvtvlDjIaUlk 4CVtiCbLApmLPkJFpUoqbiOP_Zpz.K6qnxrfMO.vG77DDPhvO0IVnNNMVO90W0MJrcFnlwbBHILo X5umqV9eaC9dZkzT0bfxVvyAsCt8.tOXZfv9xkqlqNyyUjyqELlJXo3LiUcCO2fS0J5YAruTxqUS wXd6Qya3tIgz63ywK.zi0869wwTwjZ17Pfm7awcMdxmT9Ryyz6CeKZgO6Nn6CNEidbE4vI_lycXY A7w9vAqqz9t4vmA2v0h7l4rqkSI3ImNnCmw4XYD.dgLfNUw2TSGuWXJIMA.zPkuo1VBU2svTXWtj hm7PM6fYsSWKxPv.sgxQgBUk3HX5QLSce419cYQREu6do9EOmTtZEldFBV9SN7XP1ciKv1W4Mwda b3F1VzhMSe_AgP5XwpP_1QJhD024HUH8Lw4FaaiRl9lKIHeAaG2Vx9_oTv1jHNZHP3I8YRsXAUTy NYhmkC.r8VbeSbWkZf5PiFBjhOuwI0YYjbk._XiqdOl0th63Pwa9in5EqCooVxdYNGsyJWVwyPks LWTunLhiXWgC9aoruXKOtabJEUdPAyxf9sJr08SQjUpkFXFFgFnuZRuN4O8RMDE8qT928FBHbweN iP2KYEt2kQWFSyo0pP.t9qikk1ifUd0VsrRfbkipCCFEBAFmb25elNDSNbHtDTBdsGK9uEClwINF ZEiiEe9uRw2AzeO22sv.1LAsneoZj4_ffFlJzgMqxU6URzIpQqgvIk6CZVXXJTndB8_e1Ebgq4IB MNuFbWOeZt3y_JM1X1IGBHtrW3XUP3yTg67lJ94_LE X-Sonic-MF: X-Sonic-ID: b1cbac96-fdde-46f7-9f58-11b0b76502f5 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic310.consmr.mail.ne1.yahoo.com with HTTP; Fri, 8 Dec 2023 06:49:45 +0000 Original-Received: by hermes--production-sg3-f6b777bf6-hqdxp (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 107cbf387276ea5cd4888390b8d4479d; Fri, 08 Dec 2023 06:49:42 +0000 (UTC) In-Reply-To: <83il5919fo.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 08 Dec 2023 08:43:07 +0200") X-Mailer: WebService/1.1.21943 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.186.204; envelope-from=luangruo@yahoo.com; helo=sonic310-23.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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:313604 Archived-At: Eli Zaretskii writes: > I wasn't talking about error messages, I was talking about other uses > of LANG and locale information in Emacs. E.g., we define the default > coding-systems based on the locale, and detect-coding-* guesswork uses > it. How does the solution you installed affect all that when, for > example, Emacs needs to visit a file or show an email or use > sub-process output encoded in Latin-1 with no charset information > available from other sources? Android subprocesses won't output information in Latin-1, as the C library doesn't support these locales. Furthermore, there are no OS locales that don't use UTF-8 under Android. See here: https://android.googlesource.com/platform/bionic/+/master/libc/bionic/locale.cpp#51 > As for other programs' behavior: since when we consider that a > dictate? We take the platform-specific behavior into consideration, > but make our decisions based on additional aspects as well. And I > still don't see why in this case we should use such a simplistic > solution. Is there any problem in having a mapping of the kind I > suggested? If that is possible, it sounds to me like a simple-enough > solution that will make the Android build behave like Emacs users > expect, with minimal costs and with predictable success. It is not possible, since en_US.utf8 and C are the only locales supported under Android. System languages besides that are implemented in the GUI toolkit, which does not take LANG into consideration.