Jump to content

UNICODE Strings in HTML and Javascript

Recommended Posts

QUESTION:  Is the following an accurate statement?  If not, please clarify how a unicode string literal differs from say, an ASCII string literal.


A UNICODE character string is an array-object of single character elements each with its own directional indicator.



Edited by iwato
Link to post
Share on other sites

In Javascript, all strings are internally treated as UTF-16 strings:



When a String contains actual textual data, each element is considered to be a single UTF-16 code unit. Whether or not this is the actual storage format of a String, the characters within a String are numbered by their initial code unit element position as though they were represented using UTF-16. All operations on Strings (except as otherwise stated) treat them as sequences of undifferentiated 16-bit unsigned integers; they do not ensure the resulting String is in normalised form, nor do they ensure language-sensitive results.

  • Thanks 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...