On 5/17/14 12:03 PM, "Richmond" <richmondmathew...@gmail.com> wrote:
>>One item that would be helpful to know is at what value does a unicode >>character start being represented as pairs? Is 65536 the upper limit for >>single value characters? >> ><snip> > >Representing as pairs starts at Hex D800 = Decimal 55296 Using that number, the numToUnicodePair function could be updated to accept any decimal value: function numToUnicodePair pNum if pNum < 55296 then return pNum put trunc((pNum - 65536)/1024 + 55296) into num1 put (pNum - 65536) mod 1024 + 56320 into num2 return num1,num2 end numToUnicodePair No change to the unicodePairToNum function: function unicodePairToNum pNum1,pNum2 return (pNum1 - 55296) * 1024 + (pNum2 - 56320) + 65536 end unicodePairToNum Regards, Scott Rossi Creative Director Tactile Media, UX/UI Design _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode