[Note: question basically re-edited after a lot of playing around]

In Java, you have `Charset`, defining a character encoding. From a `Charset`, you can obtain two objects:

* a `CharsetEncoder`, to turn a `char` sequence into a `byte` sequence;
* a `CharsetDecoder`, to turn a `byte` sequence into a `char` sequence.

Both of these classes have the following methods defined: `.onUnmappableCharacter()` and `.onMalformedInput()`. If you tell them for each of these to `CodingErrorAction.REPORT` they will throw either of these two exceptions: [`UnmappableCharacterException`](http://docs.oracle.com/javase/8/docs/api/java/nio/charset/UnmappableCharacterException.html) and [`MalformedInputException`](http://docs.oracle.com/javase/8/docs/api/java/nio/charset/MalformedInputException.html).

With a `CharsetEncoder`, I am able to generate both of them:

* feed it with a `CharBuffer` containing two high surrogates following one another --> `MalformedInputException`;
* feed it with a `CharBuffer` containing a `char` (or `char` sequence) which the encoding cannot represent: `UnmappableCharacterException`.

With a `CharsetDecoder`:

* feed it with an illegal byte sequence: `MalformedInputException` -- easy to do;
* `UnmappableCharacterException` --> how?

In spite of all my research, I just couldn't do it.

All of this in spite of having [played a lot with `CharsetDecoder`](https://github.com/fge/largetext). I could find no combination of `Charset` and byte sequence able to generare this error...

Is there any at all?