From freebsd-hackers Tue Jul 30 21:52:35 1996 From: Terry Lambert Date: Tue, 30 Jul 1996 21:52:35 +0000 To: freebsd-hackers Subject: Re: patch for the 'sgetrune' of EUC encoding X-MARC-Message: https://marc.info/?l=freebsd-hackers&m=94346786426542 > > 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.