Groups
Conversations
All groups and messages
Send feedback to Google
Help
Training
Sign in
Groups
dev-platform@mozilla.org
Conversations
About
Intent to prototype: Well-Formed Unicode Strings
70 views
Skip to first unread message
Yoshi Cheng-Hao Huang
unread,
Mar 28, 2023, 1:49:17 PM
3/28/23
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to dev-pl...@mozilla.org
Summary:
Add String.prototype.isWellFormed and String.prototype.toWellFormed methods.
isWellFormed() returns a boolean to indicate whether the string is a
well-formed
UTF-16.
toWellFormed() will return a string with the all unpaired surrogate code points converted to U+FFFD (REPLACEMENT CHARACTER)
This is currently at
stage 3
of TC39 proposals.
Bug:
https://bugzilla.mozilla.org/show_bug.cgi?id=1803523
Standards body:
https://tc39.es/proposal-is-usv-string/
Platform
coverage:
All
Preference:
N/A yet
Other browsers:
Chrome has shipped this since 111
https://chromestatus.com/feature/5200195346759680
flag:
--harmony-string-is-well-formed
which is enabled by default
Safari:
https://bugs.webkit.org/show_bug.cgi?id=248588
This feature has shipped this in Safari Technology Preview 160
https://webkit.org/blog/13639/release-notes-for-safari-technology-preview-160/
flag: useStringWellFormed
which is enabled by default
web-platform-tests:
Tests are located in in test262/
https://github.com/tc39/test262/tree/main/test/built-ins/String/prototype/toWellFormed
https://github.com/tc39/test262/tree/main/test/built-ins/String/prototype/isWellFormed
Reply all
Reply to author
Forward
0 new messages