Date: Mon, 17 Apr 2023 14:24:59 -0700 From: Xin LI <delphij@gmail.com> To: Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: current@freebsd.org Subject: Re: find(1): I18N gone wild ? Message-ID: <CAGMYy3tz6iCU_tiE6NHoVPdXOZGtP%2BfskWMrLXyev8SR=xRSqQ@mail.gmail.com> In-Reply-To: <202304172106.33HL6RUX051407@critter.freebsd.dk> References: <202304172106.33HL6RUX051407@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000640e9605f98ed3f4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable This is expected behavior (in en_US.UTF-8 the ordering is AaBb, not ABab). You might want to set LC_COLLATE to C if C behavior is desirable. On Mon, Apr 17, 2023 at 2:06=E2=80=AFPM Poul-Henning Kamp <phk@phk.freebsd.= dk> wrote: > This surprised me: > > # 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 > > Really ?! > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > phk@FreeBSD.ORG | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetenc= e. > > --000000000000640e9605f98ed3f4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:monospac= e,monospace">This is expected behavior (in en_US.UTF-8 the ordering is AaBb= , not ABab).=C2=A0 You might want to set=C2=A0LC_COLLATE to C if C behavior= is desirable.</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" c= lass=3D"gmail_attr">On Mon, Apr 17, 2023 at 2:06=E2=80=AFPM Poul-Henning Ka= mp <<a href=3D"mailto:phk@phk.freebsd.dk">phk@phk.freebsd.dk</a>> wro= te:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px = 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">This surpris= ed me:<br> <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 # mkdir /tmp/P<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 # cd /tmp/P<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 # touch FOO<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 # touch bar<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 # env LANG=3DC.UTF-8 find . -name '[A-Z]*&#= 39; -print<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ./FOO<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 # env LANG=3Den_US.UTF-8 find . -name '[A-Z= ]*' -print<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ./FOO<br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ./bar<br> <br> Really ?!<br> <br> -- <br> Poul-Henning Kamp=C2=A0 =C2=A0 =C2=A0 =C2=A0| UNIX since Zilog Zeus 3.20<br= > phk@FreeBSD.ORG=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0| TCP/IP since RFC 956<br> FreeBSD committer=C2=A0 =C2=A0 =C2=A0 =C2=A0| BSD since 4.3-tahoe<br> Never attribute to malice what can adequately be explained by incompetence.= <br> <br> </blockquote></div> --000000000000640e9605f98ed3f4--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGMYy3tz6iCU_tiE6NHoVPdXOZGtP%2BfskWMrLXyev8SR=xRSqQ>