Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Jul 2002 10:00:11 -0700 (PDT)
From:      Jonathan Chen <jon@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/35812: strings(1) does'n print russian characters
Message-ID:  <200207071700.g67H0BjF074019@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/35812; it has been noted by GNATS.

From: Jonathan Chen <jon@FreeBSD.org>
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207071700.g67H0BjF074019>