From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 09 16:04:42 2011 Received: (at submit) by debbugs.gnu.org; 9 Mar 2011 21:04:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxQYj-0007H1-Qo for submit@debbugs.gnu.org; Wed, 09 Mar 2011 16:04:42 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxQI4-0006s1-Su for submit@debbugs.gnu.org; Wed, 09 Mar 2011 15:47:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxQHv-0003ig-14 for submit@debbugs.gnu.org; Wed, 09 Mar 2011 15:47:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:35117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxQHu-0003ib-UJ for submit@debbugs.gnu.org; Wed, 09 Mar 2011 15:47:18 -0500 Received: from [140.186.70.92] (port=53693 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxQHt-0008V0-Mn for bug-coreutils@gnu.org; Wed, 09 Mar 2011 15:47:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxQHs-0003hz-EF for bug-coreutils@gnu.org; Wed, 09 Mar 2011 15:47:17 -0500 Received: from mx0a-00103a01.pphosted.com ([67.231.144.234]:46547) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxQHs-0003hb-6m for bug-coreutils@gnu.org; Wed, 09 Mar 2011 15:47:16 -0500 Received: from pps.filterd (m0000419 [127.0.0.1]) by mx0a-00103a01.pphosted.com (8.14.3/8.14.3) with SMTP id p29KjbhU009760 for ; Wed, 9 Mar 2011 15:47:13 -0500 Received: from mdwexght01.ciena.com (LIN1-118-36-28.ciena.com [63.118.36.28]) by mx0a-00103a01.pphosted.com with ESMTP id uxdqx0tdb-39 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT) for ; Wed, 09 Mar 2011 15:47:13 -0500 Received: from onwvexght01.ciena.com (131.213.7.243) by MDWEXGHT01.ciena.com (10.4.140.138) with Microsoft SMTP Server (TLS) id 8.1.436.0; Wed, 9 Mar 2011 15:47:09 -0500 Received: from ONWVEXGMB02.ciena.com ([131.213.7.238]) by onwvexght01.ciena.com ([131.213.7.243]) with mapi; Wed, 9 Mar 2011 15:47:09 -0500 From: "Niergarth, Jeffrey" To: "bug-coreutils@gnu.org" Date: Wed, 9 Mar 2011 15:47:09 -0500 Subject: red hat lynx 'sort' bug? Thread-Topic: red hat lynx 'sort' bug? Thread-Index: Acvemyje511mdcXISSWesVrLXLTOfg== Message-ID: <9E1A9326F14DA84CB0508E7F3C86D2B80130891EED@ONWVEXGMB02.ciena.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: multipart/alternative; boundary="_000_9E1A9326F14DA84CB0508E7F3C86D2B80130891EEDONWVEXGMB02ci_" MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15, 1.0.148, 0.0.0000 definitions=2011-03-09_08:2011-03-09, 2011-03-09, 1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=1 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=6.0.2-1012030000 definitions=main-1103090149 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 199.232.76.165 X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 09 Mar 2011 16:04:40 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) --_000_9E1A9326F14DA84CB0508E7F3C86D2B80130891EEDONWVEXGMB02ci_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The 'sort' utility (no options) doesn't behave as expected: Here are the pertinent results: /fpga/OAF/HD/rtl/vhdl_wrapper/clock_monitor_synthesis.v /fpga/OAF/HD/rtl/vhdl_wrapper/clockmonitor_synthesis.v /fpga/OAF/HD/rtl/vhdl_wrapper/clock_monitor_synthesis.v IN /fpga/OAF/HD/rtl/vhdl_wrapper/clockmonitor_synthesis.v IN Jeff neirgarth --_000_9E1A9326F14DA84CB0508E7F3C86D2B80130891EEDONWVEXGMB02ci_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

The ‘sort&= #8217; utility (no options) doesn’t behave as expected:

 

Here are th= e pertinent results:

 

/fpga/OAF/HD/rtl/vhdl_wrapper/clock_monitor_synthesi= s.v

/fpga/OAF/HD/rtl/vhdl_wrapper/clockm= onitor_synthesis.v

/fpga/OAF/HD/rtl/vhdl= _wrapper/clock_monitor_synthesis.v IN

/f= pga/OAF/HD/rtl/vhdl_wrapper/clockmonitor_synthesis.v IN

 

Jeff neirgarth

= --_000_9E1A9326F14DA84CB0508E7F3C86D2B80130891EEDONWVEXGMB02ci_-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 09 16:13:01 2011 Received: (at 8214-done) by debbugs.gnu.org; 9 Mar 2011 21:13:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxQgn-0007TM-IS for submit@debbugs.gnu.org; Wed, 09 Mar 2011 16:13:01 -0500 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxQgk-0007T2-Rw for 8214-done@debbugs.gnu.org; Wed, 09 Mar 2011 16:13:00 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p29LCq0m032535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Mar 2011 16:12:52 -0500 Received: from [10.3.113.38] (ovpn-113-38.phx2.redhat.com [10.3.113.38]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p29LCpnV003567; Wed, 9 Mar 2011 16:12:51 -0500 Message-ID: <4D77ED53.9060207@redhat.com> Date: Wed, 09 Mar 2011 14:12:51 -0700 From: Eric Blake Organization: Red Hat User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 MIME-Version: 1.0 To: "Niergarth, Jeffrey" Subject: Re: bug#8214: red hat lynx 'sort' bug? References: <9E1A9326F14DA84CB0508E7F3C86D2B80130891EED@ONWVEXGMB02.ciena.com> In-Reply-To: <9E1A9326F14DA84CB0508E7F3C86D2B80130891EED@ONWVEXGMB02.ciena.com> X-Enigmail-Version: 1.1.2 OpenPGP: url=http://people.redhat.com/eblake/eblake.gpg Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigAA49CACA58585A7C0578C9DF" X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Spam-Score: -10.3 (----------) X-Debbugs-Envelope-To: 8214-done Cc: 8214-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.3 (----------) This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigAA49CACA58585A7C0578C9DF Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 03/09/2011 01:47 PM, Niergarth, Jeffrey wrote: > The 'sort' utility (no options) doesn't behave as expected: Thanks for the report. However, I fail to see that this is a bug. >=20 > Here are the pertinent results: >=20 > /fpga/OAF/HD/rtl/vhdl_wrapper/clock_monitor_synthesis.v > /fpga/OAF/HD/rtl/vhdl_wrapper/clockmonitor_synthesis.v > /fpga/OAF/HD/rtl/vhdl_wrapper/clock_monitor_synthesis.v IN > /fpga/OAF/HD/rtl/vhdl_wrapper/clockmonitor_synthesis.v IN This looks reasonable if you are using a locale that discards punctuation from collation sorting (such as many implementations of en_US.UTF-8). This is a FAQ: http://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-o= rder_0021 Try 'LC_ALL=3DC sort' on the same data, to force all bytes to behave in ASCII ordering. I'm marking this bug as closed for now, but if you can provide compelling evidence that there really is a bug in sort after you sort out your locale, then we can re-open it. You may also want to try the 'sort --debug' option in the latest coreutils 8.10 to help diagnose what sort is really doing, and why it is correct (even if it is not what you were wanting, because you didn't use the right command line options and locale environment variables). --=20 Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org --------------enigAA49CACA58585A7C0578C9DF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJNd+1TAAoJEKeha0olJ0NqPfAIAK6Epd8N/uN/IlRE74AHIIz7 UQrNWUXcDj7+l11VgEZlloIzN1hbO3+a79yBOnpB0v61V1HKxvlHgEKEHqQvMETd XUUcyzvUsj83l7MaPNbp0okvIOBOBvnFr3N2SeeGmRj9fVsCjAEuHH6huQT+blE8 iLdc7MbdDRrSgGQTxVnT54sdr9QnQBQujScPbjdrimn25W5+o613afsIvon9H7ss 2wA7YpAWul5KzNoTIJld7t3VqsKCCBEKPWQsSVG+zgqnRnzlE4GEB0XiwrveTFxz 0ycyvgSe14h3LbGd2Kt+EfnA+xQLqBD5T5gO0nf5NN9StOyn2PAo3jbBKAphd/Q= =eadE -----END PGP SIGNATURE----- --------------enigAA49CACA58585A7C0578C9DF-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 09 16:32:01 2011 Received: (at 8214-done) by debbugs.gnu.org; 9 Mar 2011 21:32:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxQzB-0007ur-7Q for submit@debbugs.gnu.org; Wed, 09 Mar 2011 16:32:01 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxQz9-0007ue-4L for 8214-done@debbugs.gnu.org; Wed, 09 Mar 2011 16:31:59 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 0212639E80DB; Wed, 9 Mar 2011 13:31:52 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yem761TwQp5Z; Wed, 9 Mar 2011 13:31:52 -0800 (PST) Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2F12D39E810A; Wed, 9 Mar 2011 13:31:52 -0800 (PST) Message-ID: <4D77F1C7.9000402@cs.ucla.edu> Date: Wed, 09 Mar 2011 13:31:51 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Thunderbird/3.1.7 MIME-Version: 1.0 To: "Niergarth, Jeffrey" Subject: Re: bug#8214: red hat lynx 'sort' bug? References: <9E1A9326F14DA84CB0508E7F3C86D2B80130891EED@ONWVEXGMB02.ciena.com> In-Reply-To: <9E1A9326F14DA84CB0508E7F3C86D2B80130891EED@ONWVEXGMB02.ciena.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.3 (---) X-Debbugs-Envelope-To: 8214-done Cc: 8214-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.3 (---) On 03/09/2011 12:47 PM, Niergarth, Jeffrey wrote: > The 'sort' utility (no options) doesn't behave as expected: > > Here are the pertinent results: > > /fpga/OAF/HD/rtl/vhdl_wrapper/clock_monitor_synthesis.v > /fpga/OAF/HD/rtl/vhdl_wrapper/clockmonitor_synthesis.v > /fpga/OAF/HD/rtl/vhdl_wrapper/clock_monitor_synthesis.v IN > /fpga/OAF/HD/rtl/vhdl_wrapper/clockmonitor_synthesis.v IN Sounds like a locale issue. "sort --help" says this: *** WARNING *** The locale specified by the environment affects sort order. Set LC_ALL=C to get the traditional sort order that uses native byte values. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 09 16:40:27 2011 Received: (at 8214) by debbugs.gnu.org; 9 Mar 2011 21:40:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxR7L-000886-Gg for submit@debbugs.gnu.org; Wed, 09 Mar 2011 16:40:27 -0500 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PxR7J-00087p-Kl; Wed, 09 Mar 2011 16:40:26 -0500 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 8FD8D21308; Wed, 9 Mar 2011 14:40:19 -0700 (MST) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 8891D2DC43; Wed, 9 Mar 2011 14:40:19 -0700 (MST) Date: Wed, 9 Mar 2011 14:40:19 -0700 From: Bob Proulx To: "Niergarth, Jeffrey" Subject: Re: bug#8214: red hat lynx 'sort' bug? Message-ID: <20110309214019.GA3213@hysteria.proulx.com> References: <9E1A9326F14DA84CB0508E7F3C86D2B80130891EED@ONWVEXGMB02.ciena.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9E1A9326F14DA84CB0508E7F3C86D2B80130891EED@ONWVEXGMB02.ciena.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Spam-Score: -2.4 (--) X-Debbugs-Envelope-To: 8214 Cc: 8214@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.4 (--) tags 8214 + unreproducible moreinfo notabug thanks Niergarth, Jeffrey wrote: > The 'sort' utility (no options) doesn't behave as expected: Thank you for your bug report. However this doesn't read like a bug in sort but a misunderstanding of how locales affect it. > Here are the pertinent results: > > /fpga/OAF/HD/rtl/vhdl_wrapper/clock_monitor_synthesis.v > /fpga/OAF/HD/rtl/vhdl_wrapper/clockmonitor_synthesis.v > /fpga/OAF/HD/rtl/vhdl_wrapper/clock_monitor_synthesis.v IN > /fpga/OAF/HD/rtl/vhdl_wrapper/clockmonitor_synthesis.v IN That is sorted in the en_US.UTF-8 locale. In order to sort in ASCII order you would want to set your locale to C. The man page says: *** WARNING *** The locale specified by the environment affects sort order. Set LC_ALL=C to get the traditional sort order that uses native byte values. The info documentation says: Unless otherwise specified, all comparisons use the character collating sequence specified by the `LC_COLLATE' locale.(1) (1) If you use a non-POSIX locale (e.g., by setting `LC_ALL' to `en_US'), then `sort' may produce output that is sorted differently than you're accustomed to. In that case, set the `LC_ALL' environment variable to `C'. Note that setting only `LC_COLLATE' has two problems. First, it is ineffective if `LC_ALL' is also set. Second, it has undefined behavior if `LC_CTYPE' (or `LANG', if `LC_CTYPE' is unset) is set to an incompatible value. For example, you get undefined behavior if `LC_CTYPE' is `ja_JP.PCK' but `LC_COLLATE' is `en_US.UTF-8'. This topic comes up often over the years. Please see this faq for more information: http://www.gnu.org/software/coreutils/faq/#Sort-does-not-sort-in-normal-order_0021 Personally I set the following in my ~/.bashrc file. export LANG=en_US.UTF-8 export LC_COLLATE=C Bob From unknown Mon Aug 18 11:11:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 07 Apr 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator