Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Jul 1996 07:46:26 +0400 (MSD)
From:      =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (Andrey A. Chernov) <ache@nagual.ru>
To:        mihoko@pa.yokogawa.co.jp (=?ISO-2022-JP?B?GyRCRURDZkh+SmY7UhsoQg==?=)
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: patch for the 'sgetrune' of EUC encoding
Message-ID:  <199607260346.HAA01313@nagual.ru>
In-Reply-To: <199607251120.UAA00307@sapphire.pa.yokogawa.co.jp> from "[?ISO-2022-JP?]" at "Jul 25, 96 08:20:17 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> 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?

-- 
Andrey A. Chernov
<ache@nagual.ru>
http://www.nagual.ru/~ache/



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