non-breaking spaces in fields?

Fraser Gordon fraser.gordon at livecode.com
Fri Sep 25 03:23:14 EDT 2015


On 25 Sep 2015, at 08:02, Kay C Lan <lan.kc.macmail at gmail.com> wrote:

> On Fri, Sep 25, 2015 at 5:04 AM, Ralph DiMola <rdimola at evergreeninfo.net>
> wrote:
> 
>> The LC field object has always(since LC 5 anyway) respected non-breaking
>> spaces (ascii 160).
> 
> 
> I'm not seeing that on OS X 10.9.5 and LC 7.1rc2
> 
> With numToChar(160) I get a visible artifact* in between the two words.
> With  numToCodepoint(0xA0) I get a nonbreaking whitespace.

https://en.wikipedia.org/wiki/Mac_OS_Roman

In the MacRoman encoding, character 160/0xA0 is the dagger symbol. NBSP is at 202/0xCA.

Those values for NBSP will only work on OSX, though - they are assigned to different characters on Linux and Windows. For consistency, it is best to use numToCodepoint (which uses Unicode codepoint numbers) rather than numToChar (which uses the platform-specific legacy text encodings).

Fraser





More information about the use-livecode mailing list