From owner-freebsd-bugs Mon Mar 11 22:50:16 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id E028E37B416 for ; Mon, 11 Mar 2002 22:50:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2C6o1J35469; Mon, 11 Mar 2002 22:50:01 -0800 (PST) (envelope-from gnats) Date: Mon, 11 Mar 2002 22:50:01 -0800 (PST) Message-Id: <200203120650.g2C6o1J35469@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "."@babolo.ru Subject: Re: bin/35812: strings(1) does'n print russian characters Reply-To: "."@babolo.ru Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/35812; it has been noted by GNATS. From: "."@babolo.ru To: gpr@nvnpp.vrn.ru Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/35812: strings(1) does'n print russian characters Date: Tue, 12 Mar 2002 09:56:27 +0300 (MSK) Gennady Proskurin writes: > > >Number: 35812 > >Category: bin > >Synopsis: strings(1) does'n print russian characters > >Confidential: no > >Severity: non-critical > >Priority: low > >Responsible: freebsd-bugs > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Mon Mar 11 22:40:00 PST 2002 > >Closed-Date: > >Last-Modified: > >Originator: Gennady Proskurin > >Release: FreeBSD 5.0-CURRENT i386 > >Organization: > >Environment: > System: FreeBSD gpr.nvnpp.lan 5.0-CURRENT FreeBSD 5.0-CURRENT #4: Mon Mar 11 09:59:59 MSK 2002 gpr@gpr.nvnpp.lan:/usr/obj/usr/src/sys/gpr i386 > > > >Description: > strings(1) does'n print russian characters due to incorrect type cast. > > >How-To-Repeat: > echo 'some russian chars' | strings > > >Fix: > > --- /usr/src/usr.bin/strings/strings.c.orig Tue Mar 12 09:16:05 2002 > +++ /usr/src/usr.bin/strings/strings.c Tue Mar 12 09:16:07 2002 > @@ -184,7 +184,7 @@ > else > printf("%s", bfr); > while ((ch = getch()) != EOF && ISSTR(ch)) > - putchar((char)ch); > + putchar((unsigned char)ch); > putchar('\n'); > } > cnt = 0; > > > > >Release-Note: > >Audit-Trail: > >Unformatted: One more place to patch. It is my patch I use about year: --- usr.bin/strings/strings.c Mon Apr 23 02:38:13 2001 +++ usr.bin/strings/strings.c Wed Aug 22 05:05:04 2001 @@ -170,7 +170,7 @@ } start: for (cnt = 0; (ch = getch()) != EOF;) { - if (ISSTR(ch)) { + if (ISSTR(ch) & 0xff) { if (!cnt) C = bfr; *C++ = ch; @@ -183,7 +183,7 @@ foff - minlen, (char *)bfr); else printf("%s", bfr); - while ((ch = getch()) != EOF && ISSTR(ch)) + while ((ch = getch()) != EOF && ISSTR(ch & 0xff)) putchar((char)ch); putchar('\n'); } -- @BABOLO http://links.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message