From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#51832: Piping unicode text in `shell-command' Date: Sun, 14 Nov 2021 15:28:02 +0100 Message-ID: <87pmr27qx9.fsf@gnus.org> References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> <87v90u7t2l.fsf@gnus.org> <44FDC8DA-6F3B-4896-B019-D98A9E7D72E7@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37593"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 51832@debbugs.gnu.org, Alan Third , tor.a.s.kringeland@ntnu.no To: Philipp Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 14 15:29:09 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1mmGVI-0009aW-Sk for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Nov 2021 15:29:09 +0100 Original-Received: from localhost ([::1]:46446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmGVH-0000y9-Fz for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Nov 2021 09:29:07 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:50004) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmGVC-0000y0-8J for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2021 09:29:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:38016) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmGVC-0005et-0J for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2021 09:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmGVB-0007GQ-QK for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2021 09:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 14:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs Original-Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163690009427865 (code B ref 51832); Sun, 14 Nov 2021 14:29:01 +0000 Original-Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 14:28:14 +0000 Original-Received: from localhost ([127.0.0.1]:49562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGUQ-0007FN-5E for submit@debbugs.gnu.org; Sun, 14 Nov 2021 09:28:14 -0500 Original-Received: from quimby.gnus.org ([95.216.78.240]:32896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGUO-0007F7-OS for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 09:28:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XMBGVzi/fM3VlnFVaTwf2YfTXeXeJ/hCyDssqFPuLI8=; b=Dc32EZN/qs+vEZn7yN9RmbDe0W 3u6TwShGoZIfKTVsScQXS+J0kLbNmWCjN+r/7k8qP3u2yiOgXX5A9ORf66X5eW/W+BQhCR/TALZee jpVNAg8mZWIG3hjo4cyRVpl//2YZTVYGVGYU3vSXf7GR3Cd1V9v3+8AwNnkglmva6kOU=; Original-Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmGUF-0004Rt-0y; Sun, 14 Nov 2021 15:28:05 +0100 X-Now-Playing: Caroline Shaw & =?UTF-8?Q?S=C5=8D?= Percussion's _Let The Soil Play Its Simple Part_: "Some Bright Morning" In-Reply-To: <44FDC8DA-6F3B-4896-B019-D98A9E7D72E7@gmail.com> (Philipp's message of "Sun, 14 Nov 2021 15:23:03 +0100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219942 Archived-At: Philipp writes: >> That didn't fix the issue for me, I'm afraid -- with that patch, LANG is >> still the invalid en_NO.UTF-8 for me. > > Maybe we should add similar logic as iTerm2 > (https://github.com/gnachman/iTerm2/blob/79aff4d59fd591e7628649bcabe5f27541740bf6/sources/PTYSession.m#L7107): > create the locale identifier from language code and country code > instead of the current locale identifier, I think that's what's Macos is returning -- it's just concatenating those two codes to get a locale identifier. (Which is wrong, of course.) > and use setlocale (or better, newlocale) to check whether it's valid, Yes, that sounds good. > and fall back to en_US.UTF-8 otherwise? Hm... I'd rather just leave LANG unset in that case -- it'll probably lead to fewer glitches, I think. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no