0

I'm playing around with Kotlin. I'd like to iterate through the unicode surrogate blocks D800-DFFF and convert those to their string representation. For example - the decimal representation of 0xD800 is 55296. Now, given 55296, I'd like to get the unicode character - Ø from it.

I've already tried to convert the Int to its Character representation and back to a String, which works but not for all the hex/decimal values.

Tara
  • 65
  • 1
  • 7
  • This is well covered topic for the JVM, the Java answers will also be the same for Kotlin. See the duplicate marked above as well as others linked below... – Jayson Minard Nov 26 '19 at 22:40
  • https://stackoverflow.com/questions/16769753/java-char-to-its-unicode-hexadecimal-string-representation-and-vice-versa/16769863 – Jayson Minard Nov 26 '19 at 22:40
  • https://stackoverflow.com/questions/25138514/how-to-convert-hex-value-to-special-char-in-unicode – Jayson Minard Nov 26 '19 at 22:40

0 Answers0