From owner-freebsd-doc@FreeBSD.ORG Fri Jul 11 10:50:17 2003 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A74B37B401 for ; Fri, 11 Jul 2003 10:50:17 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FC6543F85 for ; Fri, 11 Jul 2003 10:50:15 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h6BHoFUp048751 for ; Fri, 11 Jul 2003 10:50:15 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h6BHoFLa048750; Fri, 11 Jul 2003 10:50:15 -0700 (PDT) Resent-Date: Fri, 11 Jul 2003 10:50:15 -0700 (PDT) Resent-Message-Id: <200307111750.h6BHoFLa048750@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Thomas Seck Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 17CC537B401 for ; Fri, 11 Jul 2003 10:40:49 -0700 (PDT) Received: from smtp1.netcologne.de (smtp1.netcologne.de [194.8.194.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75CBA43FB1 for ; Fri, 11 Jul 2003 10:40:48 -0700 (PDT) (envelope-from thomas@laurel.tmseck.homedns.org) Received: from laurel.tmseck.homedns.org (xdsl-213-168-108-173.netcologne.de [213.168.108.173]) by smtp1.netcologne.de (Postfix) with SMTP id E099A388F7 for ; Fri, 11 Jul 2003 19:40:44 +0200 (MEST) Received: (qmail 1522 invoked by uid 1001); 11 Jul 2003 17:41:02 -0000 Message-Id: <20030711174102.1521.qmail@laurel.tmseck.homedns.org> Date: 11 Jul 2003 17:41:02 -0000 From: Thomas Seck To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/54391: Document that glob(3) respects LC_COLLATE X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Thomas Seck List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jul 2003 17:50:17 -0000 >Number: 54391 >Category: docs >Synopsis: Document that glob(3) respects LC_COLLATE >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Fri Jul 11 10:50:14 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Thomas Seck >Release: FreeBSD HEAD as of July 11, 2003 >Organization: >Environment: FreeBSD 4-STABLE >Description: glob(3)'s description of GLOB_NOSORT claims that glob(3) always sorts in alphabetical order as specified by ASCII. This is not true if LC_COLLATE (or LANG, resp.) are set. >How-To-Repeat: Create the files a.test, b.test and .test with being the "a with dots" present in ISO8859-1. Then compare the output of env LC_COLLATE=en_US.US-ASCII ls *.test (.test ist sorted last) with env LC_COLLATE=en_US.ISO8859-1 ls *.test (Fix: Reword glob(3) like this: Index: glob.3 =================================================================== RCS file: /home/ncvs/src/lib/libc/gen/glob.3,v retrieving revision 1.23 diff -u -r1.23 glob.3 --- glob.3 4 Feb 2003 16:27:42 -0000 1.23 +++ glob.3 11 Jul 2003 17:05:58 -0000 @@ -197,10 +197,10 @@ .Dv GLOB_NOESCAPE is set, backslash escaping is disabled. .It Dv GLOB_NOSORT -By default, the pathnames are sorted in ascending -.Tn ASCII -order; -this flag prevents that sorting (speeding up +By default, the pathnames are sorted in locale specific ascending order +as specified by +.Ev LC_COLLATE . +This flag prevents that sorting (speeding up .Fn glob ) . .El .Pp @@ -421,7 +421,8 @@ .Sh SEE ALSO .Xr sh 1 , .Xr fnmatch 3 , -.Xr regexp 3 +.Xr regexp 3 , +.Xr setlocale 3 .Sh STANDARDS The .Fn glob >Release-Note: >Audit-Trail: >Unformatted: