std.utf uses std.utf.replacementDchar, which seems is what unicode actually expects to happen.
However, std.encoding uses std.encoding.INVALID_SEQUENCE , defined here: https://github.com/dlang/phobos/blob/master/std/encoding.d#L481
This later value isn't the one expected by the unicode standard.
Additionally, the later value creates a problem because now there are two values to handle for replacement chars.
Comment #1 by robert.schadek — 2024-12-01T16:38:14Z