3 ms·
Its a common mistake to assume strings are UTF-8 but it is a mistake. This is not a defence of Go but more of a warning to Go programmers.
by papaf 6y ago
Its a common mistake to assume strings are UTF-8 but it is a mistake.
This is not a defence of Go but more of a warning to Go programmers.
- adonovan 6y agoExactly. It's a convention, not a law of physics. If a string's UTF-8 validity is important to the correctness of your function, check it. It's not expensive.