You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
Currently all methods at, charAt, codePointAt, charCodeAt methods and length property are utf-16 based. This limits the engine to always use UTF-16 encoding internally. But most text in Web is UTF-8 which means engines need many encoding conversions.
Maybe we can add some encoding-independant methods which can avoid such burden.
For example:
const[ch,units]='😈'.at(0)
units can return 2 if underground encoding is UTF-16, or return 4 if underground encoding is UTF-8.
The text was updated successfully, but these errors were encountered:
hax
changed the title
Encoding indepe
Encoding independent method?
Sep 17, 2017
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This may be out of the scope of this proposal.
Currently all methods
at
,charAt
,codePointAt
,charCodeAt
methods andlength
property are utf-16 based. This limits the engine to always use UTF-16 encoding internally. But most text in Web is UTF-8 which means engines need many encoding conversions.Maybe we can add some encoding-independant methods which can avoid such burden.
For example:
units
can return 2 if underground encoding is UTF-16, or return 4 if underground encoding is UTF-8.The text was updated successfully, but these errors were encountered: