Page 1 of 1

Surrogate Pairs

Posted: Wed Jan 15, 2025 5:00 pm
by richmond62
Some wag at the University of Plovdiv who insists on using Windows XP has asked me to implement some Unicode stuff for them: and for that I shall have to run off a standalone from either Revolution 4.0 or LiveCode 6.7.10: both of which will requite the use of surrogate pairs.

As in 2014 I ran up an LC stack to calculate surrogate pairs that is not a problem as such.

But where in LC 9 I might type:

Code: Select all

set the text of fld "FFF" to numToCodePoint(12345678)
in LC 6.7 I get stuck at this point:

Code: Select all

set the useUnicode to true
set the text of fld "FFF" to numToChar
I cannot recall HOW to enter the 2 values of the pair.

Re: Surrogate Pairs

Posted: Wed Jan 15, 2025 6:39 pm
by richmond62
Hey-Ho: replying to my own post, again, again, again:

Code: Select all

on mouseUp
set the useUnicode to true
set the unicodeText of fld "FFF" to numToChar(13654) & numToChar(52334)
Those values are fake, for demonstration only. 8)