Skip to content

Commit 9db7c9c

Browse files
committed
newsletter: Add a note about UTF-16 strings
1 parent 587fe19 commit 9db7c9c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/content/newsletters/2025-07-31.mdx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ This was fixed this month, allowing Google reCAPTCHA to work and pass!
8181
Unfortunately, it does not work on origins that are not https://www.google.com/ due to a separate same-origin policy issue that has not been
8282
resolved.
8383

84+
### The Web is UTF-16
85+
86+
Strings in JavaScript and the Web are [UTF-16 by definition](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String#utf-16_characters_unicode_code_points_and_grapheme_clusters).
87+
Until now, we have been using a UTF-8 string type internally to represent JS strings, and we would transcode to UTF-16
88+
on-the-fly to satisfy specification requirements as needed. Over time, this has resulted in an ever-growing number of
89+
locations that need to perform extra work to behave correctly. This month, we've decided to introduce a UTF-16 string
90+
to begin using wholesale within LibJS and LibWeb. This not only make the code simpler to write and reason about, but
91+
has also fixed some Unicode-related edge cases that we previously missed.
92+
8493
### Credits
8594

8695
We'd like to thank everyone who contributed code this month:

0 commit comments

Comments
 (0)