3 ms·
The string type is utf8. You would think an old http header is a string. It's not. It looks like a string though :)
by jlouis 6y ago
The string type is utf8.
You would think an old http header is a string. It's not. It looks like a string though :)
- papaf 6y agoThe string type is utf8. Actually its not guaranteed to be UTF-8, only a sequence of bytes with some convenience methods: https://golang.org/ref/spec#String_types https://golang.org/ref/spec#String_types However, the existence of the 'strings' package and the 'range' operator give the impression that all strings are UTF-8.