32 ms·
I don't think I am mixing it up. The char type is not a unicode character just like the byte is not. Yet, these are the characters in a string type. Python went
by veselin 6y ago
I don't think I am mixing it up. The char type is not a unicode character just like the byte is not. Yet, these are the characters in a string type. Python went to fix this, jvm and clr didn't.
- takeda 6y agoI'm not that familiar with C#[1], but in Java char is absolutely an unicode character. That's why you have char and byte types. Java clearly separates them, and so is python since version 3. [1] although from quick googling it looks like C# handles things the same way as Java.
- veselin 6y agoThis used to be the case when every unicode character could fit in 16 bits. Now, most methods that take char may fail: https://docs.oracle.com/javase/7/docs/api/java/lang/Character.html https://docs.oracle.com/javase/7/docs/api/java/lang/Characte...