Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Dec 2003 06:28:58 +0100
From:      Erik Trulsson <ertr1013@student.uu.se>
To:        questions@FreeBSD.org
Subject:   Re: Is non-breaking space a space?
Message-ID:  <20031202052858.GA11469@falcon.midgard.homeip.net>
In-Reply-To: <20031202003105.GA11013@watt.intra.caraldi.com>
References:  <20031202003105.GA11013@watt.intra.caraldi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 02, 2003 at 01:31:07AM +0100, Jean-Baptiste Quenot wrote:
> Hello,
>=20
> I'm wondering why the non-breaking space is considered as a space in the
> FreeBSD  C library,  whereas  it is  not  in the  GNU  libc.  Sorry  for
> comparing the two,  but as a result, Linux and  FreeBSD are incompatible
> in the way  they handle isspace(160).  This *only*  occurs when LC_CTYPE
> is given =AB=A0single C chars locales=A0=BB like en_US.ISO8859-1.

FreeBSD and glibc people have obviously made different decisions about
how the locales should be defined.
For what it is worth, both Solaris and NetBSD agree with FreeBSD on this.


>=20
> In  /usr/src/share/mklocale, the  file  la_LN.ISO8859-1.src for  example
> contains a  SPACE definition that  includes the non-breaking  space.  It
> seems that it  is so since the  beginning of FreeBSD, but  is there some
> reference, some standard that states  whether NBSP is considered a space
> or not?

According to the C standard it is implementation-defined (for locales
other than the "C" locale. In the "C" locale NBSP is not considered as
a space.) Both the Linux and FreeBSD definitions are compatible with
the C standard.

If you look at the locale definitions found at
http://www.dkuug.dk/JTC1/SC22/WG15  it would seem that NBSP should be
considered as a space character, but there might be some other standard
somewhere else that says differently.

My belief is that FreeBSD gets it right, and GNU libc is wrong, but I
am sure the GNU people have a different opinion.


--=20
<Insert your favourite quote here.>
Erik Trulsson
ertr1013@student.uu.se



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