From owner-freebsd-bugs Sat Aug 31 21:40: 9 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CEC7337B400 for ; Sat, 31 Aug 2002 21:40:04 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8FB2F43E42 for ; Sat, 31 Aug 2002 21:40:04 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g814e3JU095351 for ; Sat, 31 Aug 2002 21:40:03 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g814e39v095350; Sat, 31 Aug 2002 21:40:03 -0700 (PDT) Date: Sat, 31 Aug 2002 21:40:03 -0700 (PDT) Message-Id: <200209010440.g814e39v095350@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: dwmalone@FreeBSD.ORG (David Malone) Cc: gpr@nvnpp.vrn.ru, dwmalone@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG, bug-followup@FreeBSD.ORG Subject: Re: bin/35812: strings(1) does'n print russian characters Date: Sun, 1 Sep 2002 08:40:04 +0400 (MSD) David Malone writes: > Synopsis: strings(1) does'n print russian characters > > State-Changed-From-To: open->closed > State-Changed-By: dwmalone > State-Changed-When: Sat Aug 31 15:48:27 PDT 2002 > State-Changed-Why: > Submitter reckons PR can be closed (as a binutils issue at heart). Without strings(1) patched? I understand (may be) binutils issue, but my patch bypass this issue. (there was a little error in my previous patch) --- 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'); } PS As far as I understand without this patch strings(1) do not works properly with another locales with upper half of table used (europian for example) -- @BABOLO http://links.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message