(id sql.CharacterSetID, utf8 []byte)
| 93 | } |
| 94 | |
| 95 | func EncodeBytes(id sql.CharacterSetID, utf8 []byte) ([]byte, error) { |
| 96 | en, err := getEncoding(id) |
| 97 | if err != nil { |
| 98 | return utf8, err |
| 99 | } else if en == encoding.Nop { |
| 100 | return utf8, nil |
| 101 | } |
| 102 | return en.NewEncoder().Bytes(utf8) |
| 103 | } |
| 104 | |
| 105 | func DecodeBytes(id sql.CharacterSetID, encoded []byte) ([]byte, error) { |
| 106 | en, err := getEncoding(id) |
nothing calls this directly
no test coverage detected