From owner-freebsd-current@FreeBSD.ORG Mon Sep 17 09:21:32 2007 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5C0B16A468; Mon, 17 Sep 2007 09:21:32 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 628B313C474; Mon, 17 Sep 2007 09:21:32 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.1/8.14.1) with ESMTP id l8H9LUcZ024575; Mon, 17 Sep 2007 13:21:30 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1190020890; bh=in9z/PHZlGEE4tG+WYA7NtgItI4Bi1zZQaoCIFt Dt7k=; l=909; h=Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:User-Agent; b=uOQLGFj6FPzeQ1rQme8/xregDOupVjSb+ZuPLH71 oVDd54XmuzZ8A9cWWOFoZ0wkHAzdMAtSFwtjU0hTyyNtaNBRlfwo6jH5hmVjw4+7qxE +I1dNJ2C8TCEdtpGzWLXxVRMukoKafMBe7w8IsnU69wLnT0YZT7craYCnE5sSB+w= Received: (from ache@localhost) by nagual.pp.ru (8.14.1/8.14.1/Submit) id l8H9LU6d024574; Mon, 17 Sep 2007 13:21:30 +0400 (MSD) (envelope-from ache) Date: Mon, 17 Sep 2007 13:21:30 +0400 From: Andrey Chernov To: Petr Hroudn?? Message-ID: <20070917092130.GA24424@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Petr Hroudn?? , current@freebsd.org, i18n@freebsd.org, perky@freebsd.org References: <20070916192924.GA12678@nagual.pp.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.16 (2007-06-09) Cc: perky@freebsd.org, current@freebsd.org, i18n@freebsd.org Subject: Re: Ctype patch for review X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Sep 2007 09:21:33 -0000 On Mon, Sep 17, 2007 at 10:29:21AM +0200, Petr Hroudn?? wrote: > 2007/9/16, Andrey Chernov : > > The problem is: currently our single byte ctype functions are broken for > > wide characters locales in the argument range >= 0x80 - they may return > > false positives. > > > > For example, for UTF-8 locale we currently have: > > iswspace(0xA0)==1 and isspace(0xA0)==1 > > (because iswspace() and isspace() are the same code) > > but must have > > isspace(0xA0)==0 > > This is exactly what happens on other OSes and I agree this is the > right behaviour > for UTF-8. However, we must ensure, that: > > for C locale: isspace(0xA0)==0 > for ISO8859-* locales: isspace(0xA0)==1 > for UTF-8 locales: isspace(0xA0)==0 The patch test for wide char locale presence first (__mb_cur_max > 1), so does not affect single byte locales like ISO8859-* -- http://ache.pp.ru/