Add `PyStringMethods::encode_utf8`.