Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Sep 2007 10:29:21 +0200
From:      "=?UTF-8?Q?Petr_Hroudn=C3=BD?=" <petr.hroudny@gmail.com>
To:        "Andrey Chernov" <ache@nagual.pp.ru>, current@freebsd.org, i18n@freebsd.org, perky@freebsd.org, petr.hroudny@gmail.com
Subject:   Re: Ctype patch for review
Message-ID:  <ab8fc7f50709170129p6f436069iffaf697e83a34e3c@mail.gmail.com>
In-Reply-To: <20070916192924.GA12678@nagual.pp.ru>
References:  <20070916192924.GA12678@nagual.pp.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
2007/9/16, Andrey Chernov <ache@nagual.pp.ru>:
> 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

Regards, Petr.



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