numToChar with socking great numbers

Fraser Gordon fraser.gordon at runrev.com
Mon Jan 13 05:24:19 EST 2014


Hi Richmond,

My bad, should have been:

numtoChar(55357) & numToChar(56832)

Note that current versions of LiveCode don't really treat surrogate pairs properly - each codeunit of the pair is treated as a character so it is possible to do things like apply a style that only affects one of the two units. When this happens, the string gets split between the pair and it no longer works properly so be careful.

As I like to harp on about, this will be fixed in 7.0.

Regards,
Fraser


On 13 Jan 2014, at 10:19, Richmond <richmondmathewson at gmail.com> wrote:

>> 
> So I did this:
> 
> on mouseUp
>   set the useUnicode to true
>   set the unicodetext of fld "ffff" to numtoChar(55357) + numToChar(56832)
> end mouseUp
> 
> 
> and got this:
> 
> button "Button": execution error at line 3 (Operators +: error in left operand), char 56
> 
> something obviously not quite right.
> 
> Richmond.
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list