From owner-freebsd-hackers Tue Jul 30 14:53:03 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA10851 for hackers-outgoing; Tue, 30 Jul 1996 14:53:03 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id OAA10843 for ; Tue, 30 Jul 1996 14:52:55 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id OAA00735; Tue, 30 Jul 1996 14:52:35 -0700 From: Terry Lambert Message-Id: <199607302152.OAA00735@phaeton.artisoft.com> Subject: Re: patch for the 'sgetrune' of EUC encoding To: ache@nagual.ru (=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=) Date: Tue, 30 Jul 1996 14:52:35 -0700 (MST) Cc: mihoko@pa.yokogawa.co.jp, freebsd-hackers@FreeBSD.org In-Reply-To: <199607260346.HAA01313@nagual.ru> from "=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=" at Jul 26, 96 07:46:26 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk > > That is, The library function 'mblen(3)' doesn't return the error > > when the second byte is not set MSB. > > I make the following patch for this problem. > > ... > > > + /* '0x80-0x9f' are control codes */ > > + if ((c = (unsigned char)*string++) < 0xa0) { > > I dislike this hardcoded assumption, because it makes sgetrune > very charset-depended without proper configuration knobs. > I.e. if it plans to sense control codes, it must be iscntrl() > instead. > Could you change this thing? Hee hee! 8-). I wondered how long this would last before the KOI-8 people cake out against it... if only they were using the ISO standard for Coptic languages instead... }B-}. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.