Chris Uppal wrotes:
> Are UnicodeStrings implicitly null-terminated with one null-byte or two ? And
> if the later, how does the VM know that it should use two ? Can one create
> byte-objects with > 2 bytes of implicit null-padding.
It depends on the encoding. If UTF-8 is used, the 0-byte has only 1
Byte, whereas in UTF-16 it will have 2 Bytes.
Take a look:
<
http://en.wikipedia.org/wiki/Utf>
<
http://en.wikipedia.org/wiki/Utf-8>
<
http://en.wikipedia.org/wiki/UTF-16>