From owner-freebsd-hackers@freebsd.org Thu Mar 9 09:26:43 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D47E9D0229C for ; Thu, 9 Mar 2017 09:26:43 +0000 (UTC) (envelope-from Mark.Martinec+freebsd@ijs.si) Received: from mail.ijs.si (mail.ijs.si [IPv6:2001:1470:ff80::25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90745D32 for ; Thu, 9 Mar 2017 09:26:43 +0000 (UTC) (envelope-from Mark.Martinec+freebsd@ijs.si) Received: from amavis-ori.ijs.si (localhost [IPv6:::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.ijs.si (Postfix) with ESMTPS id 3vf4lV3tyfz1K2; Thu, 9 Mar 2017 10:26:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ijs.si; h= user-agent:message-id:references:in-reply-to:organization :subject:subject:from:from:date:date:content-transfer-encoding :content-type:content-type:mime-version:received:received :received:received; s=jakla4; t=1489051582; x=1491643583; bh=V8U RQTKxhq65IT37FzogpGOVb7Cl4xjoPZ1nRd1rDY4=; b=F3qbLnMQmBD1hSRTpqU 1L9JBLQDDNII3M+X2qnn44ywkoKYmSf7RfJ+2906r93JhJRfSaVz0NeM98HYCOQV BSKZpmI5k6s17qBK5XIE8kAcZVrgCXpNFQuXfce76loEuub5wktdmValIFAyAQqH h+MY+35a+gOsqtmAFlNmekSo= X-Virus-Scanned: amavisd-new at ijs.si Received: from mail.ijs.si ([IPv6:::1]) by amavis-ori.ijs.si (mail.ijs.si [IPv6:::1]) (amavisd-new, port 10026) with LMTP id 8u56SahEps53; Thu, 9 Mar 2017 10:26:22 +0100 (CET) Received: from mildred.ijs.si (mailbox.ijs.si [IPv6:2001:1470:ff80::143:1]) by mail.ijs.si (Postfix) with ESMTP id 3vf4lF3jsqz1Jx; Thu, 9 Mar 2017 10:26:17 +0100 (CET) Received: from nabiralnik.ijs.si (nabiralnik.ijs.si [IPv6:2001:1470:ff80::80:16]) by mildred.ijs.si (Postfix) with ESMTP id 3vf4lF2sPCzXM; Thu, 9 Mar 2017 10:26:17 +0100 (CET) Received: from squid2.ijs.si (2001:1470:ff80::3128:2) by webmail.ijs.si with HTTP (HTTP/1.1 POST); Thu, 09 Mar 2017 10:26:17 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 09 Mar 2017 10:26:17 +0100 From: Mark Martinec To: freebsd-hackers@freebsd.org Cc: Matthias Apitz Subject: Re: Why en_US.UTF-8 locale consider a < A? Organization: Jozef Stefan Institute In-Reply-To: <20170308155947.GA4129@c720-r292778-amd64> References: <062a0098-1975-6d2b-b017-f623e46ca20b@delphij.net> <20170308084047.qc2j3vnrh5hycg32@ivaldir.net> <7ad51573-c575-ad2f-b3bd-b011d15981ed@delphij.net> <20170308155947.GA4129@c720-r292778-amd64> Message-ID: X-Sender: Mark.Martinec+freebsd@ijs.si User-Agent: Roundcube Webmail/1.2.3 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Mar 2017 09:26:44 -0000 2017-03-08 16:59, Matthias Apitz wrote: > I recently came across with a related problem and have two questions > (unresolved until now): > > 1. > Using sort, reading the man page of it, it should be sufficient to > set LC_COLLATE correctly. It seems that setting LANG (or unsetting it) > changes the sort Order, why? The search/priority order is: LC_ALL -> LC_COLLATE -> LANG, so in absence of LC_COLLATE and LC_ALL, the LANG determines the collation. http://pubs.opengroup.org/onlinepubs/7908799/xbd/envvar.html : The values of locale categories are determined by a precedence order; the first condition met below determines the value: If the LC_ALL environment variable is defined and is not null, the value of LC_ALL is used. If the LC_* environment variable ( LC_COLLATE, LC_CTYPE, LC_MESSAGES, LC_MONETARY, LC_NUMERIC, LC_TIME) is defined and is not null, the value of the environment variable is used to initialise the category that corresponds to the environment variable. If the LANG environment variable is defined and is not null, the value of the LANG environment variable is used. If the LANG environment variable is not set or is set to the empty string, the implementation-dependent default locale is used. > 2. > Speaking about German Umlauts, should they be treated as their normal > letters, i.e. 'รค' is like 'a', as one can read in Wiki, or how they are > sorted exactly? Mark