☕ *Morning Coffee Link* --
How fast can you fix a UTF-16 string in C#? -
https://lemire.me/blog/2026/09/26/how-fast-can-you-fix-a-utf-16-string-in-c/
(Morning Coffee Link is a single link every weekday about coding that either sparks debate, provokes a thought process of some kind, or introduces a technique for developers).
See the entire list at https://www.danylkoweb.com/MorningCoffeeLink
Daniel Lemire's blogHow fast can you fix a UTF-16 string in C#?C# strings are UTF-16. Most characters are one 16-bit code unit. Characters outside the basic multilingual plane, emoji included, take two: a high surrogate (U+D800 to U+DBFF) followed by a low surrogate (U+DC00 to U+DFFF). A surrogate with the wrong neighbor, or with none, is ill-formed. You should never send an ill-formed string to disk … Continue reading How fast can you fix a UTF-16 string in