Re: DOMString NULL-termination?

That is intentionally unspecified, as long as it is able to properly 
represent the sequences of characters, including all legal XML characters.

The actual choice of type is left up to the binding, as long as it meets 
the basic rules of being a sequence of 16-bit units. In Java, it mapps 
to the built-in string object, which clearly is not null-terminated and 
may contain nullswithin the string.  So, if you have a concrete binding, 
you need to see how that binding declares it.  If you are creating a new 
binding, you should compare your own binding's native types and try to 
choose the best one, or if there is nothing adequate, you may need 
something new.  The choice gets trickier if you want something that will 
work across multiple bindings, some of whose string types may already be 
concretely specified, such as binding a COM implementation to Javascript 
or Perl.

Ray Whitmer
rayw@netscape.com

Ian Macky wrote:

>Greetings.  A question about DOMString type:
>
>    Are DOMStrings supposed to be NULL-terminated (de facto
>    C standard), or length-encoded (somehow)?
>
>Nowhere can I find a specification for the format of a DOMString,
>beyond "A DOMString is a sequence of 16-bit units" (CORE 1.1.5).
>
>Please reply to me directly or cc as I am not on the mailing list.
>
>Thanks.
>
>--ian
>

Received on Monday, 8 April 2002 17:31:00 UTC