I think you want to actually encode the string as UTF-8, but force the encoding (metadata) to something else:

<pre>
irb(main):004:0> str = "\255ay!".encode('UTF-8').force_encoding('UTF-32LE')
=> "\u{217961AD}"
</pre>

So that later when we try to normalize, it will fail:

<pre>
irb(main):005:0> str.encode('UTF-8')
Encoding::InvalidByteSequenceError: "\xADay!" on UTF-32LE
</pre>