Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Apr 2023 09:14:21 -1000
From:      "parv/FreeBSD" <parv.0zero9+freebsd@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   Re: find(1): I18N gone wild? [[:alpha:]] not a substitute to refer 26 English letters A-Z
Message-ID:  <CABObuOpJg%2BC-fSjfUXB9bH2JO0py6OqP2WzqLDN3NRERqYSJGQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--000000000000b46d6805f9dd7a33
Content-Type: text/plain; charset="UTF-8"

Wrote Dimitry Andric on Fri, 21 Apr 2023 10:38:05 UTC
(via
https://lists.freebsd.org/archives/freebsd-current/2023-April/003556.html )
>
> ... 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:]]:
...

Subject to the locale, problem with that is "[[:alpha:]]" will match
more than 26 English letters "A" through "Z" (besides also matching
lower case "a" through "z") even if none of 26 * 2 English alphabets
appear in a string.


- parv

--000000000000b46d6805f9dd7a33
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">Wrote=20
Dimitry Andric on=20
Fri, 21 Apr 2023 10:38:05 UTC</div><div class=3D"gmail_default" style=3D"fo=
nt-family:monospace">(via <a href=3D"https://lists.freebsd.org/archives/fre=
ebsd-current/2023-April/003556.html">https://lists.freebsd.org/archives/fre=
ebsd-current/2023-April/003556.html</a> )</div><div class=3D"gmail_default"=
 style=3D"font-family:monospace">&gt;<br></div><div class=3D"gmail_default"=
 style=3D"font-family:monospace">&gt; ... However, I have read that with un=
icode, you should *never*</div><div class=3D"gmail_default" style=3D"font-f=
amily:monospace">&gt; use [A-Z] or [0-9], but character classes instead. Th=
at seems to give</div><div class=3D"gmail_default" style=3D"font-family:mon=
ospace">&gt; both files on macOS and Linux with [[:alpha:]]:</div><div clas=
s=3D"gmail_default" style=3D"font-family:monospace">...</div><div class=3D"=
gmail_default" style=3D"font-family:monospace"><br></div><div class=3D"gmai=
l_default" style=3D"font-family:monospace">Subject to the locale, problem w=
ith that is &quot;[[:alpha:]]&quot; will match</div><div class=3D"gmail_def=
ault" style=3D"font-family:monospace">more than 26 English letters &quot;A&=
quot; through &quot;Z&quot; (besides also matching</div><div class=3D"gmail=
_default" style=3D"font-family:monospace">lower case &quot;a&quot; through =
&quot;z&quot;) even if none of 26 * 2 English alphabets</div><div class=3D"=
gmail_default" style=3D"font-family:monospace">appear in a string.<br></div=
><div class=3D"gmail_default" style=3D"font-family:monospace"><br></div><di=
v class=3D"gmail_default" style=3D"font-family:monospace"><br></div><div cl=
ass=3D"gmail_default" style=3D"font-family:monospace">- parv</div><div clas=
s=3D"gmail_default" style=3D"font-family:monospace"><br></div></div>

--000000000000b46d6805f9dd7a33--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABObuOpJg%2BC-fSjfUXB9bH2JO0py6OqP2WzqLDN3NRERqYSJGQ>