Skip to content

Implement DOMString type #18

Closed
Closed

Description

@hepheir

The DOMString type

To ensure interoperability, the DOM specifies the DOMString type as follows:

  • A DOMString is a sequence of 16-bit quantities. This may be expressed in IDL terms as:

       typedef sequence<unsigned short> DOMString;
    
  • Applications must encode DOMString using UTF-16 (defined in Appendix C.3 of [UNICODE] and Amendment 1 of [ISO-10646]).The UTF-16 encoding was chosen because of its widespread industry practice. Please note that for both HTML and XML, the document character set (and therefore the notation of numeric character references) is based on UCS-4. A single numeric character reference in a source document may therefore in some cases correspond to two array positions in a DOMString (a high surrogate and a low surrogate). Note: Even though the DOM defines the name of the string type to be DOMString, bindings may used different names. For, example for Java, DOMString is bound to the String type because it also uses UTF-16 as its encoding.

Note: As of August 1998, the OMG IDL specification included a wstring type. However, that definition did not meet the interoperability criteria of the DOM API since it relied on encoding negotiation to decide the width of a character.


https://www.w3.org/TR/REC-DOM-Level-1/level-one-core.html#ID-C74D1578

Activity

  1. self-assigned this
    on Jun 2, 2021
  2. hepheir commented on Jun 2, 2021

    @hepheir
    OwnerAuthor

    현재는 DOMString을 str의 alias로 사용하고 있다.

  3. changed the title [-]Implement of DOMString type[/-] [+]Implement of `DOMString` type[/+] on Jun 2, 2021
  4. changed the title [-]Implement of `DOMString` type[/-] [+]Implement `DOMString` type[/+] on Jun 2, 2021
  5. added a commit that references this issue on Jun 2, 2021
  6. linked a pull request that will close this issueImplement type `DOMString` #33on Jun 6, 2021
  7. added a commit that references this issue on Jun 6, 2021
    c899ee7
  8. added
    type:othersissues not falling in bug, perfromance, support, build and install or feature
    and removed
    enhancementNew feature or request
    type:othersissues not falling in bug, perfromance, support, build and install or feature
    on Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions