Surrogate Pairs

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

Surrogate Pairs

Post by richmond62 » Wed Jan 15, 2025 5:00 pm

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.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10094
Joined: Fri Feb 19, 2010 10:17 am

Re: Surrogate Pairs

Post by richmond62 » Wed Jan 15, 2025 6:39 pm

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)

Post Reply