From owner-freebsd-bugs Sun Jul 7 10: 0:20 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 7757137B405 for ; Sun, 7 Jul 2002 10:00:12 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id D80BA43E52 for ; Sun, 7 Jul 2002 10:00:11 -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 g67H0BJU074020 for ; Sun, 7 Jul 2002 10:00:11 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g67H0BjF074019; Sun, 7 Jul 2002 10:00:11 -0700 (PDT) Date: Sun, 7 Jul 2002 10:00:11 -0700 (PDT) Message-Id: <200207071700.g67H0BjF074019@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Jonathan Chen Subject: Re: bin/35812: strings(1) does'n print russian characters Reply-To: Jonathan Chen 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: Jonathan Chen To: freebsd-gnats-submit@FreeBSD.org, gpr@nvnpp.vrn.ru, "."@babolo.ru Cc: Subject: Re: bin/35812: strings(1) does'n print russian characters Date: Sun, 7 Jul 2002 12:50:06 -0400 Gennady Proskurin writes: [...] - putchar((char)ch); + putchar((unsigned char)ch); I do not believe the type-casting is necessary, since putchar() takes an int. Casting to unsigned char (or just char for that matter) would break wchar too. Please try replacing putchar(...) with simply putchar(ch) and let me know if that works. "."@babolo.ru writes: [...] - if (ISSTR(ch)) { + if (ISSTR(ch) & 0xff) { [...] - while ((ch = getch()) != EOF && ISSTR(ch)) + while ((ch = getch()) != EOF && ISSTR(ch & 0xff The first diff here appears to be wrong, you probably meant (ch & 0xff) instead of what you have. Nevertheless, I don't think either of these changes are necessary, since all the functions in ISSTR are able to take integers as well. Please try strings with only the typecast removal change. Let me know of this works, and I'll commit it. If not, something else is probably broken... -Jon To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message