Every Chinese Character is represented by a two byte code.
getBytes()
Encodes this String into a sequence of bytes using the platform's default charset, storing the result into a new byte array.
For UTF -8
1.Two bytes are needed for Latin letters with diacritics and for characters from Greek, Cyrillic, Armenian, Hebrew, Arabic, Syriac and Thaana alphabets (Unicode range U+0080 to U+07FF).
2.Three bytes are needed for the rest of the Basic Multilingual Plane (which contains virtually all characters in common use).
So how many bytes is Chinese character ?
Depending on the platform's default charset, this is pretty likely to NOT produce your original Chines characters ...
getBytes()
Encodes this String into a sequence of bytes using the platform's default charset, storing the result into a new byte array.
String(byte[] bytes)
Constructs a new String by decoding the specified array of bytes using the platform's default charset.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
When you say you are "seeing" the characters I assume you must be using some piece of software to project them onto your eyeballs. I see that kind of output in Firefox when the font it's using is incapable of rendering a character. Instead of just displaying an empty rectangular box as a fallback, it displays a rectangular box with the Unicode value of the character inside.Originally posted by Gamini Sirisena:
Any idea about what this font is?
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |