top | item 44924558 (no title) bradfitz | 6 months ago > Golang use UTF-8 for in-memory string.Nope. It’s just bytes with no encoding.https://go.dev/blog/strings discuss order hn newest qouteall|6 months ago Corrected. ivanjermakov|6 months ago There 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|6 months ago Go strings are just bytes. There is no Unicode or encodings.
ivanjermakov|6 months ago There 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|6 months ago Go strings are just bytes. There is no Unicode or encodings.
qouteall|6 months ago
ivanjermakov|6 months ago
But I agree that author's statement is wrong. Go stings are equivalent to byte slices.
bradfitz|6 months ago