Date: Tue, 2 Dec 2003 01:31:07 +0100 From: Jean-Baptiste Quenot <jb.quenot@caraldi.com> To: questions@FreeBSD.org Subject: Is non-breaking space a space? Message-ID: <20031202003105.GA11013@watt.intra.caraldi.com>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hello,
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 « single C chars locales » like en_US.ISO8859-1.
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?
BTW the « official » [1]sources for glibc ctype functions have an
interesting comment:
static bool
is_space (unsigned int ch)
{
/* Don't make U+00A0 a space. Non-breaking space means that all programs
should treat it like a punctuation character, not like a space. */
Best regards,
--
Jean-Baptiste Quenot
http://caraldi.com/jbq/
[1] http://sources.redhat.com/cgi-bin/cvsweb.cgi/libc/localedata/gen-unicode-ctype.c?rev=1.4&content-type=text/x-cvsweb-markup&cvsroot=glibc
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/y91J9xx3BCMc9gsRAnxnAJ9+0qWz9wQuPn36TShjTsHoFhqfCQCdF5sL
8dsyDAnigZG8h27DYbplW2Q=
=DdYL
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031202003105.GA11013>
