Re:Strings, bytes, runes and characters in Go
by dsymonds on Wednesday October 23, 2013 @09:09PM
(#6602835)
No, read the article more carefully. A Go string's internal representation is a sequence of bytes. There's nothing UTF-8 about it.
[ Parent
| on HN ]
Re:Strings, bytes, runes and characters in Go
by skybrian on Thursday October 24, 2013 @02:53AM
(#6603744)
I understood the article just fine. It's not wrong to say that in Go, text (called strings in other languages) is nearly always represented in UTF8 format and is commonly stored in variables of type string, or sometimes []byte.
Perhaps I should have left out the word "internal" since it's exposed.
Re:Strings, bytes, runes and characters in Go
by dsymonds on Thursday October 24, 2013 @06:42PM
(#6608545)
Yes, "internal representation" has a specific meaning. If you had said "standard representation" or something then I would have agreed with you.