From owner-freebsd-questions@FreeBSD.ORG Tue Dec 2 00:49:46 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B74B916A4CE for ; Tue, 2 Dec 2003 00:49:46 -0800 (PST) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by mx1.FreeBSD.org (Postfix) with SMTP id 5062143FA3 for ; Tue, 2 Dec 2003 00:49:44 -0800 (PST) (envelope-from ertr1013@student.uu.se) Received: (qmail 76463 invoked by uid 1001); 2 Dec 2003 08:49:43 -0000 Date: Tue, 2 Dec 2003 09:49:42 +0100 From: Erik Trulsson To: questions@FreeBSD.org Message-ID: <20031202084942.GA65870@falcon.midgard.homeip.net> Mail-Followup-To: questions@FreeBSD.org References: <20031202003105.GA11013@watt.intra.caraldi.com> <20031202052858.GA11469@falcon.midgard.homeip.net> <20031202081818.GA1463@watt.intra.caraldi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031202081818.GA1463@watt.intra.caraldi.com> User-Agent: Mutt/1.5.5.1i Subject: Re: Is non-breaking space a space? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Dec 2003 08:49:46 -0000 On Tue, Dec 02, 2003 at 09:18:20AM +0100, Jean-Baptiste Quenot wrote: > * Erik Trulsson: > > > On Tue, Dec 02, 2003 at 01:31:07AM +0100, Jean-Baptiste Quenot wrote: > > > > > 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? > > > > 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. > > That's also my opinion. Let's explain the whole story: I'm > reformatting my email messages with textproc/par, and I noticed since > I'm using FreeBSD that all non-breaking spaces are converted to spaces > during filtering, just because isspace(160) is true. Of course, if I > put non-breaking spaces in my text, I'm not expecting the lines to be > broken on them, and I don't want them to be filtered out, because nbsps > make sense when used appropriately. > > After a while, I discovered that the issue is related to locales. And > IMHO it makes sense not to consider nbsp as a space. Where shall I > report the problem? I would say that is a problem with the tool you are using, in that it does not seem to be aware of the existence of non-breaking spaces, or treat them specially. I think that NBSP should be considered as a space (if nothing else the very name "non-breaking space" implies that it is a space, albeit a not a normal space), but it should not be considered as a word-separator. Unfortunately many programs (and many standards for that matter) assume that all types of whitespace are word-separators as well, which they probably shouldn't do. -- Erik Trulsson ertr1013@student.uu.se