From nobody Fri Apr 21 10:38:05 2023 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Q2rbM4XYWz46FC9 for ; Fri, 21 Apr 2023 10:38:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Q2rbM3w9gz3mM9; Fri, 21 Apr 2023 10:38:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682073503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=X1yu9E26lmYrtPNDqXR7V639KnAGd6TPgg3RysP9gBU=; b=ox8cVonDPLT7OIFRWkTh4P8Q9jUei6ZANamfn7m/vnke7Ski8jJlldDu9kMQgtPq8Q+KZw l+3TL4a7WlDpePzs3Qmn6q0+smJWq8xxGgwhdw8J4yVaHYYREfDmEHeqYfwIQ/NaAm74Yq eUCrqOsSF/ZAZlO4VBYh9/kO7ESqrDeU4Ee/r45BAGjn+x5LtWyXRDjUGLbT0TblOOiKV9 l0FbK6lfWp3KFvimamTjKcsC67nM+uKgLf5JKWftsMyu3vzCqm1E89iV2nxFJ6RmPdLrCe PGU81XG17ViC1lIkFHTiS7SaiN6UmaeS0aORlMq95RS4YNdHsgGT7h3sLapMCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1682073503; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=X1yu9E26lmYrtPNDqXR7V639KnAGd6TPgg3RysP9gBU=; b=DKhpr3unnCxXUyeKuMXzt8XuqDotlb4Qg4ZC0ZjfpIGaJZlKQK32ozmJLqEreih+h7jppY ZhVUE+cSDaaCy/xeGRRkYw5kF6hpqiX/5nyIEsuJnfhM3aAj6iNzEz1YNSooiPlG0lweMH fxCmWTWwd/iOUrXEgRavX+g0h02PO5xwI/eSgSfYMPiPOUP5stqFvcoKuK9I2M3cSmoNW3 4mVCzj7nrVCgqO2ucmDSDu6vQexISdv9gqMZ8Z7Fy73EUnz+3HGhqKgkMZgnh2PvYt6Pjy oCnHbYSVX0JHXu5qcD7fqo7gZfSE8FoF7hIHJRF6TwZpLQbqAwU5OQcQDnjrxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1682073503; a=rsa-sha256; cv=none; b=XkcW2s9YqS/eYGuDiQH9O4N42uoOlUZg1iUyLgIpXysf8wLYMMto/vW1TlGbZg/imoYYpb lgV5X+HJ8vi6I3xBplxktOQrbO0xX+LxAHTE6dzKau0OYSNheQGHFDQQOWGVCrAj8m7VRn 9KBmvjssIh7SYNgkh7fbM7Px8aOAMa91Pe8ktScQjClJQmFzWKpyIpkR24gvjWfX8b+//z FGS5XWnyK9uMqwUbE3OJTbjZZGpBUFFODJ6BUbDuf3QSeXBVPE4iGdVECPV/7VOdap1Ikk 0/VS46e/pfYGjiWY7p83KnAKDmMvMIhonfhvhHR1iA2Tcv+3R9oDTL1cYNllIQ== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "R3" (verified OK)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Q2rbM2DBfz19HY; Fri, 21 Apr 2023 10:38:23 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (longrow.home.andric.com [192.168.0.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id E1F33685B4; Fri, 21 Apr 2023 12:38:21 +0200 (CEST) Content-Type: multipart/signed; boundary="Apple-Mail=_58B1808E-7CDD-464A-BEDF-DB6D3AC97BF1"; protocol="application/pgp-signature"; micalg=pgp-sha1 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: find(1): I18N gone wild ? From: Dimitry Andric X-Priority: 3 (Normal) In-Reply-To: <564252502.12.1682071276296@mailrelay> Date: Fri, 21 Apr 2023 12:38:05 +0200 Cc: Poul-Henning Kamp , current@freebsd.org Message-Id: References: <202304172106.33HL6RUX051407@critter.freebsd.dk> <564252502.12.1682071276296@mailrelay> To: Ronald Klop X-Mailer: Apple Mail (2.3731.500.231) X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_58B1808E-7CDD-464A-BEDF-DB6D3AC97BF1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 21 Apr 2023, at 12:01, Ronald Klop wrote: > Van: Poul-Henning Kamp > Datum: maandag, 17 april 2023 23:06 > Aan: current@freebsd.org > Onderwerp: find(1): I18N gone wild ? > This surprised me: >=20 > # mkdir /tmp/P > # cd /tmp/P > # touch FOO > # touch bar > # env LANG=3DC.UTF-8 find . -name '[A-Z]*' -print > ./FOO > # env LANG=3Den_US.UTF-8 find . -name '[A-Z]*' -print > ./FOO > ./bar >=20 > Really ?! ... > My Mac and a Linux server only give ./FOO in both cases. Just a 2 = cents remark. Same here. However, I have read that with unicode, you should *never* use [A-Z] or [0-9], but character classes instead. That seems to give both files on macOS and Linux with [[:alpha:]]: $ LANG=3Den_US.UTF-8 find . -name '[[:alpha:]]*' -print ./BAR ./foo and only the lowercase file with [[:lower:]]: $ LANG=3Den_US.UTF-8 find . -name '[[:lower:]]*' -print ./foo But on FreeBSD, these don't work at all: $ LANG=3Den_US.UTF-8 find . -name '[[:alpha:]]*' -print $ LANG=3Den_US.UTF-8 find . -name '[[:lower:]]*' -print This is an interesting rabbit hole... :) -Dimitry --Apple-Mail=_58B1808E-7CDD-464A-BEDF-DB6D3AC97BF1 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.2 iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCZEJnjQAKCRCwXqMKLiCW o1q/AJ9GDBFlhlXhv7jPnhbEdImI8MKrjACfefJ7A7gkn2K2LVHkevKiXtA/7sk= =5KGL -----END PGP SIGNATURE----- --Apple-Mail=_58B1808E-7CDD-464A-BEDF-DB6D3AC97BF1--