On 14/11/2004 07:36, Doug Ewell wrote:
...
An unusual type of "compatible" that makes a special allowance for strings with embedded nulls, impossible by definition in C.
If the Java architects had wanted a variable-length array of arbitrary
byte data, they should have created such a type in the first place,
instead of overloading the string type. Strings are for text. Text
does not need nulls.
A string of Unicode characters (including control characters as well as text) may consist of any valid Unicode character, and U+0000 is (for better or for worse) a valid Unicode character. Therefore some such escape mechanism is required to represent an arbitrary string of Unicode characters (in a UTF-8-lookalike representation) in a way compatible with C string handling.
Otherwise what would happen? Would it be acceptable for Java programs to crash, or even throw error messages, if presented with Unicode strings including U+0000?
-- Peter Kirk [EMAIL PROTECTED] (personal) [EMAIL PROTECTED] (work) http://www.qaya.org/

