JavaScript/Browsers String implementation is "funky" in so far, as it can handle to display UTF-16 correctly, also do transformations correctly in UTF-16, mostly, yet some methods treat strings as UCS2. As Opal relies on String with Opal String being a bridged class, these issues leak to Ruby space. For example:
JavaScript/Browsers String implementation is "funky" in so far, as it can handle to display UTF-16 correctly, also do transformations correctly in UTF-16, mostly, yet some methods treat strings as UCS2. As Opal relies on String with Opal String being a bridged class, these issues leak to Ruby space. For example:
Opal:
Ruby:
For reference:
This should be considered for #2231