Comment Comment by csande17 Yeah, I feel like the only really defensible choices you can make for string representation in a low-level wire protocol in 2025 are:- "Unicode Scalars", aka "well-formed UTF-16", aka "the Python string type"- "Potentially ill-formed UTF-16", aka "WTF-8", aka "the JavaScript string type"- "Potentially ill-formed UTF-8", aka "an array of bytes", aka "the Go string type"- Any of the above, plus "no U+0000", if you have to interface with a language/library that was designed before people knew what buffer overflow exploits were parent csande17 1 year ago
- "Unicode Scalars", aka "well-formed UTF-16", aka "the Python string type"
- "Potentially ill-formed UTF-16", aka "WTF-8", aka "the JavaScript string type"
- "Potentially ill-formed UTF-8", aka "an array of bytes", aka "the Go string type"
- Any of the above, plus "no U+0000", if you have to interface with a language/library that was designed before people knew what buffer overflow exploits were