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>
index | next in thread | raw e-mail
[-- Attachment #1 --] 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 [-- Attachment #2 --] <div dir="ltr"><div class="gmail_default" style="font-family:monospace">Wrote Dimitry Andric on Fri, 21 Apr 2023 10:38:05 UTC</div><div class="gmail_default" style="font-family:monospace">(via <a href="https://lists.freebsd.org/archives/freebsd-current/2023-April/003556.html">https://lists.freebsd.org/archives/freebsd-current/2023-April/003556.html</a> )</div><div class="gmail_default" style="font-family:monospace">><br></div><div class="gmail_default" style="font-family:monospace">> ... However, I have read that with unicode, you should *never*</div><div class="gmail_default" style="font-family:monospace">> use [A-Z] or [0-9], but character classes instead. That seems to give</div><div class="gmail_default" style="font-family:monospace">> both files on macOS and Linux with [[:alpha:]]:</div><div class="gmail_default" style="font-family:monospace">...</div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">Subject to the locale, problem with that is "[[:alpha:]]" will match</div><div class="gmail_default" style="font-family:monospace">more than 26 English letters "A" through "Z" (besides also matching</div><div class="gmail_default" style="font-family:monospace">lower case "a" through "z") even if none of 26 * 2 English alphabets</div><div class="gmail_default" style="font-family:monospace">appear in a string.<br></div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace"><br></div><div class="gmail_default" style="font-family:monospace">- parv</div><div class="gmail_default" style="font-family:monospace"><br></div></div>help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABObuOpJg%2BC-fSjfUXB9bH2JO0py6OqP2WzqLDN3NRERqYSJGQ>
