numToChar with socking great numbers

Richmond richmondmathewson at gmail.com
Sun Jan 12 16:45:48 EST 2014


On 12/01/14 23:31, Richmond wrote:
> So, I found that the Unicode Consortium puts a smiley face at address 
> 1F600 (hex) = 128512(decimal),
>
> but when I go
>
> set the useUnicode to true
> set the unicodeText of fld "feeld" to numToChar(128512)
>
> I get a nifty Bengali char that returns 62976, which is, rather 
> predictably,
> 128512 - 65536 (or 256 x 256).
>
> And, while that is all rather jolly in terms of base 16 Maths is 
> doesn't do much for
> my urge to propagate smiley faces all over the shop.
>
> Doing this:
>
> set the useUnicode to true
> set the unicodeText of fld "feeld" to numToChar(65536+62976)
>
> gives me numToChar(62976)
>
> Now I assume (dangerous business that) that there is a way (???) to 
> get hold of the characters
> in the higher planes (i.e. above 65536) of the Unicode font system, 
> but don't know how to do that.
>
> Does anybody know?
>
> Richmond.

I thought I'd have a go at surrogate pairs: 
http://www.russellcottrell.com/greek/utilities/SurrogatePairCalculator.htm

and was told that 1F600 was equal to D83D + DE00 : a.k.a. 128512 = 
55357+56832

so did this:


set the useUnicode to true
set the unicodeText of fld "feeld" to numToChar(55357+56832

no joy.

Richmond.




More information about the use-livecode mailing list