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
pgp00000.pgp
Description: PGP signature