From owner-freebsd-bugs Sat Aug 31 21:37:50 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7207D37B400; Sat, 31 Aug 2002 21:37:47 -0700 (PDT) Received: from aaz.links.ru (aaz.links.ru [193.125.152.37]) by mx1.FreeBSD.org (Postfix) with ESMTP id C767C43E65; Sat, 31 Aug 2002 21:37:45 -0700 (PDT) (envelope-from babolo@links.ru) Received: (from babolo@localhost) by aaz.links.ru (8.9.3/8.9.3) id IAA02162; Sun, 1 Sep 2002 08:40:04 +0400 (MSD) Message-Id: <200209010440.IAA02162@aaz.links.ru> Subject: Re: bin/35812: strings(1) does'n print russian characters In-Reply-To: <200208312250.g7VMod8H034002@freefall.freebsd.org> from "David Malone" at "Aug 31, 2 03:50:39 pm" To: dwmalone@FreeBSD.ORG (David Malone) Date: Sun, 1 Sep 2002 08:40:04 +0400 (MSD) Cc: gpr@nvnpp.vrn.ru, dwmalone@FreeBSD.ORG, freebsd-bugs@FreeBSD.ORG, bug-followup@FreeBSD.ORG From: "."@babolo.ru MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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