Login  Register

Re: Is a non-break space whitespace?

Posted by Julián Maestri-2 on Sep 28, 2017; 9:08pm
URL: https://forum.world.st/Is-a-non-break-space-whitespace-tp4971514p4973633.html

The non breaking space, is a whitespace character or separator depending on the context.
As far as i know it's not considered as a separator only when deciding text layout, it means do not break the line here: eg: "A distance of 100 meters" (nbsp between 100 and meters) should be rendered as either:
> A distance of 100 meters
or:
> A distance of
> 100 meters
But not:
> A distance of 100
> meters

There's an opposite character (don't remember the code) which means <you can break here if you need to> which is NOT a whitespace.

On 25 September 2017 at 10:21, stephan <[hidden email]> wrote:
On 25-09-17 09:53, Richard Sargent wrote:
Rather than off-the-cuffing anything, please honour the Unicode Character
Properties. Refer to
https://en.wikipedia.org/wiki/Unicode_character_property#Whitespace, among
others.

That is a good idea. And it won't help you if you scrape data from the web, as you'll find plenty of bad encoding. And unclarity over which version of which standard was used (see mongolian vowel separator)

Stephan