From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Wed, 12 Mar 2014 19:16:34 -0400 To: 9fans@9fans.net Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: [9fans] =?utf-8?q?_sort_-df_vs=2E_=CE=BC?= Topicbox-Message-UUID: c9716a88-ead8-11e9-9d60-3106f5b1d025 i've been fighting a bit with the manual, and found that =CE=BClawdec(1) was coming in the middle of the ells. it appears that sort -df is wrong. we should not treat mapto[255] like sign extension. /n/atom/plan9/sys/src/cmd/sort.c:1292,1298 - sort.c:1292,1298 /* * for characters out of range, * the table does not do Rflag. - * ignore is based on mapto[255] + * ignore is computed directly. */ if(c !=3D 0 && c < nelem(f->mapto)) { c =3D f->mapto[c]; /n/atom/plan9/sys/src/cmd/sort.c:1299,1305 - sort.c:1299,1305 if(c =3D=3D 0) continue; } else { - if(f->mapto[nelem(f->mapto)-1] =3D=3D 0) + if(f->flags & Iflag) continue; /* * consider building maps as necessary this seems too obvious, so have i missed anything? - erik