1 Reply Latest reply: Apr 6, 2013 9:50 PM by Flex harUI RSS

    Parsing strings with Unicode values > 16 bits

    Read Roberts

      How can I get the Unicode value for a character in a String when the value is greater than 16 bits?


      I need to extract a supplemental plane Unicode value from a string. However,  String.charCodeAt(index) truncates the Unicode value to 16 bits,  returning what should be 0x02F91A  as  0xF91A.  I see discussions that show that earlier versions of Flex stores such char codes as the two code points of a surrogate pair, but  in Flex 4, the string length is just 1 when I put only this character in the string.