NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/36394 awk tolower/toupper functions don't support multibyte charsets



The following reply was made to PR bin/36394; it has been noted by GNATS.

From: Aleksey Cheusov <cheusov%tut.by@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/36394 awk tolower/toupper functions don't support multibyte 
charsets
Date: Mon, 27 Apr 2009 21:53:40 +0300

 --=-=-=
 
 This problem was sucessfully fixed.
 I think you can close this PR.
 
 Though, my addition to awk regression tests were lost.
 I have no NetBSD/current to adapt the following patch to the current.
 
 
 --=-=-=
 Content-Type: text/x-patch; charset=utf-8
 Content-Disposition: inline; filename=awk.regress.patch
 Content-Transfer-Encoding: quoted-printable
 Content-Description: addon for awk regression tests
 
 Index: tolower/Makefile
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/regress/usr.bin/awk/tolower/Attic/Makefile,v
 retrieving revision 1.2
 diff -u -r1.2 Makefile
 --- tolower/Makefile   27 Oct 2008 20:59:22 -0000      1.2
 +++ tolower/Makefile   27 Apr 2009 19:53:25 -0000
 @@ -9,7 +9,7 @@
  CLEANFILES=3D result
 =20
  regress:
 -      env LANG=3Den_US.UTF-8 \
 +      env LC_CTYPE=3Den_US.UTF-8 \
                ${AWK} -f ${.CURDIR}/test.awk ${.CURDIR}/input > result
        @cmp ${.CURDIR}/expected result
 =20
 Index: tolower/expected
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/regress/usr.bin/awk/tolower/Attic/expected,v
 retrieving revision 1.1
 diff -u -r1.1 expected
 --- tolower/expected   25 Oct 2007 14:51:18 -0000      1.1
 +++ tolower/expected   27 Apr 2009 19:53:25 -0000
 @@ -1 +1,2 @@
  abc=C3=A6=C3=B8=C3=A5
 +=D0=BF=D1=80=D0=B8=D0=B2=D0=B5=D1=82 =D0=B2=D1=81=D0=B5=D0=BC =D1=80=D0=B0=
 =D0=B7=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=87=D0=B8=D0=BA=D0=B0=D0=BC netbsd!
 Index: tolower/input
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/regress/usr.bin/awk/tolower/Attic/input,v
 retrieving revision 1.1
 diff -u -r1.1 input
 --- tolower/input      25 Oct 2007 14:51:18 -0000      1.1
 +++ tolower/input      27 Apr 2009 19:53:25 -0000
 @@ -1 +1,2 @@
  ABC=C3=86=C3=98=C3=85
 +=D0=9F=D1=80=D0=B8=D0=B2=D0=B5=D1=82 =D0=B2=D1=81=D0=B5=D0=BC =D1=80=D0=B0=
 =D0=B7=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=87=D0=B8=D0=BA=D0=B0=D0=BC NetBSD!
 Index: tolower/test.awk
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/regress/usr.bin/awk/tolower/Attic/test.awk,v
 retrieving revision 1.1
 diff -u -r1.1 test.awk
 --- tolower/test.awk   25 Oct 2007 14:51:18 -0000      1.1
 +++ tolower/test.awk   27 Apr 2009 19:53:25 -0000
 @@ -1,5 +1,5 @@
  # $Id: test.awk,v 1.1 2007/10/25 14:51:18 he Exp $
 =20
 -END {
 +{
        print tolower($0);
  }
 Index: toupper/Makefile
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/regress/usr.bin/awk/toupper/Attic/Makefile,v
 retrieving revision 1.2
 diff -u -r1.2 Makefile
 --- toupper/Makefile   27 Oct 2008 20:59:22 -0000      1.2
 +++ toupper/Makefile   27 Apr 2009 19:53:25 -0000
 @@ -9,7 +9,7 @@
  CLEANFILES=3D result
 =20
  regress:
 -      env LANG=3Den_US.UTF-8 \
 +      env LC_CTYPE=3Den_US.UTF-8 \
                ${AWK} -f ${.CURDIR}/test.awk ${.CURDIR}/input > result
        @cmp ${.CURDIR}/expected result
 =20
 Index: toupper/expected
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/regress/usr.bin/awk/toupper/Attic/expected,v
 retrieving revision 1.1
 diff -u -r1.1 expected
 --- toupper/expected   25 Oct 2007 14:51:19 -0000      1.1
 +++ toupper/expected   27 Apr 2009 19:53:25 -0000
 @@ -1 +1,2 @@
  ABC=C3=86=C3=98=C3=85
 +=D0=9F=D0=A0=D0=98=D0=92=D0=95=D0=A2 =D0=92=D0=A1=D0=95=D0=9C =D0=A0=D0=90=
 =D0=97=D0=A0=D0=90=D0=91=D0=9E=D0=A2=D0=A7=D0=98=D0=9A=D0=90=D0=9C NETBSD!
 Index: toupper/input
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/regress/usr.bin/awk/toupper/Attic/input,v
 retrieving revision 1.1
 diff -u -r1.1 input
 --- toupper/input      25 Oct 2007 14:51:19 -0000      1.1
 +++ toupper/input      27 Apr 2009 19:53:25 -0000
 @@ -1 +1,2 @@
  abc=C3=A6=C3=B8=C3=A5
 +=D0=9F=D1=80=D0=B8=D0=B2=D0=B5=D1=82 =D0=B2=D1=81=D0=B5=D0=BC =D1=80=D0=B0=
 =D0=B7=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=87=D0=B8=D0=BA=D0=B0=D0=BC NetBSD!
 Index: toupper/test.awk
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/regress/usr.bin/awk/toupper/Attic/test.awk,v
 retrieving revision 1.1
 diff -u -r1.1 test.awk
 --- toupper/test.awk   25 Oct 2007 14:51:19 -0000      1.1
 +++ toupper/test.awk   27 Apr 2009 19:53:25 -0000
 @@ -1,5 +1,5 @@
  # $Id: test.awk,v 1.1 2007/10/25 14:51:19 he Exp $
 =20
 -END {
 +{
        print toupper($0);
  }
 
 --=-=-=
 
 
 -- 
 Best regards, Aleksey Cheusov.
 
 --=-=-=--
 


Home | Main Index | Thread Index | Old Index