Skip navigation
Read Roberts
Currently Being Moderated

Parsing strings with Unicode values > 16 bits

Apr 5, 2013 5:58 PM

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.


More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points