From unknown Mon Aug 11 18:15:40 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16838: Confusing localization of seq Resent-From: =?UTF-8?Q?G=C3=B6ran?= Uddeborg Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 21 Feb 2014 22:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 16838 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 16838@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.139302295214792 (code B ref -1); Fri, 21 Feb 2014 22:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Feb 2014 22:49:12 +0000 Received: from localhost ([127.0.0.1]:35180 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGyu7-0003qW-OB for submit@debbugs.gnu.org; Fri, 21 Feb 2014 17:49:12 -0500 Received: from eggs.gnu.org ([208.118.235.92]:59429) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WGyu5-0003qG-PI for submit@debbugs.gnu.org; Fri, 21 Feb 2014 17:49:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGytq-00040H-Js for submit@debbugs.gnu.org; Fri, 21 Feb 2014 17:49:04 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60839) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGytq-00040B-GL for submit@debbugs.gnu.org; Fri, 21 Feb 2014 17:48:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGyti-0001HM-D4 for bug-coreutils@gnu.org; Fri, 21 Feb 2014 17:48:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WGytZ-0003wb-Gc for bug-coreutils@gnu.org; Fri, 21 Feb 2014 17:48:46 -0500 Received: from smtprelay-h31.telenor.se ([213.150.131.4]:38129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WGytZ-0003v8-A6 for bug-coreutils@gnu.org; Fri, 21 Feb 2014 17:48:37 -0500 Received: from ipb2.telenor.se (ipb2.telenor.se [195.54.127.165]) by smtprelay-h31.telenor.se (Postfix) with ESMTP id 8575DEAA3A for ; Fri, 21 Feb 2014 23:48:33 +0100 (CET) X-SENDER-IP: [83.227.168.100] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AptkAHHXB1NT46hkPGdsb2JhbABagwYBeYdVsVWEJoQWFwMBAQEBODWCZhyBMQwKiDYBmwSwW48BhCIEmDSVVTs X-IronPort-AV: E=Sophos;i="4.97,521,1389740400"; d="scan'208";a="826040215" Received: from ua-83-227-168-100.cust.bredbandsbolaget.se (HELO mimmi.uddeborg.se) ([83.227.168.100]) by ipb2.telenor.se with ESMTP; 21 Feb 2014 23:48:24 +0100 Received: from mimmi.uddeborg (localhost [127.0.0.1]) by mimmi.uddeborg.se (8.14.7/8.14.7) with ESMTP id s1LMmLnx011973 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 21 Feb 2014 23:48:22 +0100 Received: (from goeran@localhost) by mimmi.uddeborg (8.14.7/8.14.5/Submit) id s1LMmLiP011972; Fri, 21 Feb 2014 23:48:21 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21255.55221.186590.5875@mimmi.uddeborg> Date: Fri, 21 Feb 2014 23:48:21 +0100 From: =?UTF-8?Q?G=C3=B6ran?= Uddeborg X-Mailer: VM 8.1.2 under 24.3.1 (x86_64-redhat-linux-gnu) X-Face: "m&!q8; elk)j/GjdH0A1-5euH[VSc"z|=FSJFsZMltGCVh^{K :^Y;hs=IW^!,^]<.Do*c6+Eg2{+(^IjaW<2X,!<6=S\`8s3$0p'*sQ"tm\<(tRW?,CmQ3 X-URL: http://www.uddeborg.se/g%C3%B6ran/ X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) It seems the input arguments of "seq" are not localized, but the output is. I was surprised to find this, and thought I'd ask here if it is an intentional decision. More specifically, I'm using the Swedish locale, where the radix character is a comma. The arguments to "seq" does not accept a comma, but the output is written using it. mimmi$ env LANG=sv_SE.utf8 seq 1 0.3 2 1,0 1,3 1,6 1,9 I realized this using coreutils-8.21 on Fedora. From unknown Mon Aug 11 18:15:40 2025 X-Loop: help-debbugs@gnu.org Subject: bug#16838: Confusing localization of seq Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Sat, 22 Feb 2014 01:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16838 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: =?UTF-8?Q?G=C3=B6ran?= Uddeborg Cc: 16838@debbugs.gnu.org Received: via spool by 16838-submit@debbugs.gnu.org id=B16838.1393034083969 (code B ref 16838); Sat, 22 Feb 2014 01:55:02 +0000 Received: (at 16838) by debbugs.gnu.org; 22 Feb 2014 01:54:43 +0000 Received: from localhost ([127.0.0.1]:35217 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WH1nf-0000FY-DS for submit@debbugs.gnu.org; Fri, 21 Feb 2014 20:54:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44958) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WH1nb-0000FL-VG for 16838@debbugs.gnu.org; Fri, 21 Feb 2014 20:54:40 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s1M1scJp008960 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 21 Feb 2014 20:54:38 -0500 Received: from [10.36.116.26] (ovpn-116-26.ams2.redhat.com [10.36.116.26]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s1M1sZN8031633 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 21 Feb 2014 20:54:37 -0500 Message-ID: <5308035A.9050804@draigBrady.com> Date: Sat, 22 Feb 2014 01:54:34 +0000 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 References: <21255.55221.186590.5875@mimmi.uddeborg> In-Reply-To: <21255.55221.186590.5875@mimmi.uddeborg> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) On 02/21/2014 10:48 PM, Göran Uddeborg wrote: > It seems the input arguments of "seq" are not localized, but the > output is. I was surprised to find this, and thought I'd ask here if > it is an intentional decision. > > More specifically, I'm using the Swedish locale, where the radix > character is a comma. The arguments to "seq" does not accept a comma, > but the output is written using it. > > mimmi$ env LANG=sv_SE.utf8 seq 1 0.3 2 > 1,0 > 1,3 > 1,6 > 1,9 > > I realized this using coreutils-8.21 on Fedora. That is an unfortunate asymmetry, though founded in pragmatism. Similarly date(1) for example can't parse the localized output that it can itself generate. Do we really want to complicate the code to support the many different numeric formats, including different grouping sizes, grouping characters, alternative digits like ۱٬۲۳۴ etc.? More important to code complexity is the simplification of the interface by restricting the input to a subset format and only considering localized output at the final step for presentation. Now rather than consider changing these _programmatic_ interfaces, we might support conversion of localized input in an explicit entry point to the system. We could isolate that functionality in the new numfmt utility, which could be updated to support these asymmetric localization conversions. thanks, Pádraig. From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 11 18:15:48 2018 Received: (at control) by debbugs.gnu.org; 11 Oct 2018 22:15:48 +0000 Received: from localhost ([127.0.0.1]:45654 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAjFE-0002PD-5i for submit@debbugs.gnu.org; Thu, 11 Oct 2018 18:15:48 -0400 Received: from mail-pf1-f181.google.com ([209.85.210.181]:39391) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gAjFC-0002Ow-D5 for control@debbugs.gnu.org; Thu, 11 Oct 2018 18:15:46 -0400 Received: by mail-pf1-f181.google.com with SMTP id c25-v6so5102440pfe.6 for ; Thu, 11 Oct 2018 15:15:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:message-id:date:user-agent:mime-version:content-language :content-transfer-encoding; bh=aCMPf+7kyoxN+rBTekFZz3oWrRjDvMuc6vTuYT21Ayk=; b=jQSTj1oIOh/kU+0QgvVa9jAf+WwO4i158LaHlPg5KcDpTdIIMVsexf46xGQWHnYLM8 +zReHcVThWS5DKY2PtiaYQGoq0/qHoDTNNNQ7BTSHUqQwf5HTyh5a6RobQNQugQFtydJ Rt2cbxuXfVQHEozp/uVR62CVqhNPR6aaaYGnlGU20ZoIjt4uN5rnGh2BcOMDV5upRjvo 6dwGWMSXjJC8ddSe+KJfFeLw6KnDTzBrUeAiZj247qIw5PooKZAmz9jkgQfx2LmRWPJC 98xDJquUSuqjjWj758gJwUlPLaWqlEn+H43oIvxpqV7epCT+uuams8HD7MkjZy1uo3/8 nwXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=aCMPf+7kyoxN+rBTekFZz3oWrRjDvMuc6vTuYT21Ayk=; b=XAcJmAEOey9bb2WzHT6+srgmRjRzR4cDJbuTkbhLNQxG/XSET2F5+c/jjtle2ISd0V YsQW4UwM1Z1NbdhHaf5HYWoZ0bZ6A7oO7bzRAWXn4000cNozruOCjhAqqpwg2RAkePfP CboI+2L8zn9621bO6EApDM3/7ZZVOJt7Ca3HO7PZ4EXgZXAorXCKS93G/O64ggjklOud 3XKuBNBnYabnsHdE00C3fOPEUO9WVB+MFDzrf7X37xHyNiFxeTz24yLJJxTZ5gEYlMWQ s0j/PGkwzaDWVWEWjs5iKC2GQvuq9P92h+5Y5lCllSnlj8/pChugcBAQtQhPz3RZnIbG h/8A== X-Gm-Message-State: ABuFfogJB04BZVDOwb0VfdxCQKygSQpusXbFwqFvlObU9/zrOBl+BIHK lIYX2UAUTb546doifRv5Qh/++IfM X-Google-Smtp-Source: ACcGV63/p1ZxnixeZlKyAhWdRojntCOIqhMBML/uGDJBsBc9xOlhDy1myTnczOQ7SPvTJ1b7zRMyWA== X-Received: by 2002:a62:3384:: with SMTP id z126-v6mr3277051pfz.85.1539296139769; Thu, 11 Oct 2018 15:15:39 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id t15-v6sm66768319pfj.7.2018.10.11.15.15.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Oct 2018 15:15:38 -0700 (PDT) To: control@debbugs.gnu.org From: Assaf Gordon Message-ID: Date: Thu, 11 Oct 2018 16:15:36 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 15308 notabug close 15308 tags 15634 notabug close 15634 tags 16004 notabug severity 16004 wishlist close 16004 [...] Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (assafgordon[at]gmail.com) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.210.181 listed in list.dnswl.org] 0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.210.181 listed in wl.mailspike.net] 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject 0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tags 15308 notabug close 15308 tags 15634 notabug close 15634 tags 16004 notabug severity 16004 wishlist close 16004 tags 16245 notabug close 16245 tags 16249 notabug close 16249 tags 16249 notabug close 16249 close 16309 tags 16468 notabug close 16468 tag 16530 notabug close 16530 tags 16718 notabug close 16718 tags 16742 +moreinfo close 16742 tags 16831 wontfix close 16831 tags 16838 wontfix close 16838 tags 16872 fixed close 16872 close 16945 close 17224 tags 17503 + notabug close 17503 close 17546 tags 17904 notabug close 17904