lib/pq — pull request #170 by kr (2013-10-16 21:32:35+00:00)
Title: Utf8name

Some small stylistic changes.

- Using regexp here seems gratuitous; like driving a Formula-1 race car to buy groceries.
- Don't need to crash just because the requested encoding is unsupported.
- Update and expand the commentary. In particular, I was confused by the original
name `notUTF8re`, signature `mustBeUtf8(value)`, and `Recognize all sorts of silly things as utf-8`,
thinking they would check whether the encoding of the string is valid UTF-8,
when they actually check whether the contents match the *string* `"UTF-8"`. The new signature is `isUTF8(name)`, and it has a comment explaining what the function does.