3 ms·
it's based on the JVM which uses UTF-16 internally for strings
by egnehots 3y ago
it's based on the JVM which uses UTF-16 internally for strings
- 3PS 3y agoUnderstandable, though JVM strings can also use the UTF-8 charset under the hood. In fact, if you initialize a Kotlin string from a byte array, it'll default to assuming the UTF-8 charset [0]. (Kotlin chars are still 16-bit code units though, and it is true that you can't use the native JVM char type if you do this. Personally I think that's still acceptable.) [0] https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-string.html https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/-st...