In the assignment description, there is some kind of information:
... All text values, and all fields (which are text only), contain only 8 bit characters, null terminated if less than the maximum length for the field. The character encoding is
8 bit US ASCII. Please notice it is "8 bit US ASCII".
So when I use string.getBytes( charsetName ), I want to put a proper charset to get bytes for the
string. I looked up in the
Java API 1.5 class Charset, and it says:
US-ASCII Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the Unicode character set
...
UTF-8 Eight-bit UCS Transformation Format
I am wondering which one I should use? or any other suggestions?
Thanks a lot.