[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: patch for the 'sgetrune' of EUC encoding
From:       =?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?= (Andrey A. Chernov) <ache () nag
Date:       1996-07-26 3:46:26
[Download RAW message or body]

> 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/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic