iwato Posted June 19, 2019 Share Posted June 19, 2019 (edited) QUESTION: Is the following an accurate statement? If not, please clarify how a unicode string literal differs from say, an ASCII string literal. Quote A UNICODE character string is an array-object of single character elements each with its own directional indicator. Roddy Untitled-1.html Edited June 19, 2019 by iwato Link to comment Share on other sites More sharing options...
justsomeguy Posted June 19, 2019 Share Posted June 19, 2019 In Javascript, all strings are internally treated as UTF-16 strings: http://ecma-international.org/ecma-262/5.1/#sec-8.4 http://speakingjs.com/es5/ch24.html 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. 1 Link to comment Share on other sites More sharing options...
iwato Posted June 19, 2019 Author Share Posted June 19, 2019 Have you seen this? I have just started exploring it. https://github.com/bbc/unicode-bidirectional Roddy Link to comment Share on other sites More sharing options...
justsomeguy Posted June 19, 2019 Share Posted June 19, 2019 I'm not familiar with that, I feel like I used something similar to that at one point but that project is only 2 years old so it wouldn't have been that. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now