This can be checked in the `preprocess` implementation and raise Ruby's own `EncodingError`.