Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class · Ruby 4.1
Encoding::InvalidByteSequenceError
< EncodingError
7 instance methods
Raised by Encoding and String methods when the string being transcoded contains a byte invalid for the either the source or target encoding.