7 ms·
> Golang use UTF-8 for in-memory string. Nope. It’s just bytes with no encoding. https://go.dev/blog/strings https://go.dev/blog/strings
by bradfitz 1y ago
> Golang use UTF-8 for in-memory string.
Nope. It’s just bytes with no encoding.
https://go.dev/blog/strings https://go.dev/blog/strings
- ivanjermakov 1y agoThere is no such thing as "just bytes" when it comes to Unicode. UTF-8 is a way to represent Unicode codepoints in binary. But I agree that author's statement is wrong. Go stings are equivalent to byte slices.
- bradfitz 1y agoGo strings are just bytes. There is no Unicode or encodings.
- qouteall 1y agoCorrected.