Date: Fri, 9 Jul 2021 10:34:33 +0200 From: Michael Gmelin <freebsd@grem.de> To: Warner Losh <imp@bsdimp.com> Cc: freebsd-arch@freebsd.org Subject: Re: FreeBSD awk behavior change proposal Message-ID: <6B660498-9EBD-4A5A-B08C-CC9F3B6C4617@grem.de> In-Reply-To: <CANCZdfq8HrGUcFe8n=p2scpw3rHPkZTxu8XK27uFi=4w7DBhow@mail.gmail.com> References: <CANCZdfq8HrGUcFe8n=p2scpw3rHPkZTxu8XK27uFi=4w7DBhow@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 9. Jul 2021, at 10:28, Warner Losh <imp@bsdimp.com> wrote: >=20 > =EF=BB=BFGreetings, >=20 > I've posted https://reviews.freebsd.org/D31114 which eliminates the last > delta we have from upstream one-true-awk. This delta has basically been > rejected by upstream as being a really bad idea. Let me give some > background. >=20 > In 2005, FreeBSD changed one-true-awk to honor the locale's collating orde= r. > https://svnweb.freebsd.org/base/head/usr.bin/awk/b.c.diff?annotate=3D14632= 2&pathrev=3D201988 > This was billed as a temporary patch. It was also compatible with > the then-current behavior of gawk. That temporary patch has lasted 16 > years now. >=20 > However, IEEE Std 1003.1-2008 changed the behaivor of ranges in regular > expressions outside of the "C" and "POSIX" locales to be undefined. >=20 > Starting in 2011, gawk 4.0 stopped using the locale for the range > regular expressions and used the traditional behavior only. The > maintainer had grown weary of answering why '[A-Z]' would sometimes > match lower-case expressions. The details about are explained here: > https://www.gnu.org/software/gawk/manual/html_node/Ranges-and-Locales.html= >=20 > To restore compatibility with other implementaitons of awk, revert this > patch. FreeBSD is the odd-system out. It also has the nice side effect > of eliminating the last of our differences with upstream one-true-awk. >=20 > I'd like to commit the change at least to -current. Ideally, I'd like to M= FC > the change. I believe better compatibility with gawk and other awk > implementations justifies this change in behavior because the current > behavior is outside the mainstream enough to be considered a bug. +1
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6B660498-9EBD-4A5A-B08C-CC9F3B6C4617>