Date: Sun, 1 Sep 2002 08:40:04 +0400 (MSD) 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 Message-ID: <200209010440.IAA02162@aaz.links.ru> In-Reply-To: <200208312250.g7VMod8H034002@freefall.freebsd.org> from "David Malone" at "Aug 31, 2 03:50:39 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209010440.IAA02162>