This content has been marked as final. Show 3 replies
Default encoding on my system is UTF-8.
Will it be correct to say that since UTF-8 maps each character into 1 to 4 bytes, this mapping is causing the change in number of bytes?
However, when we get bytes from string we just get the actual byte representation of UTF characters.Err, what? When you get bytes from a String, you get the bytes according to the encoding specified. Or if there are characters that can't be represented with the encoding chosen, you usually get question marks or other such error character.