Encodes dstring to KOI8RString or KOI8UString. The input does not have to be valid.
The UTF32-string for transcoding.
dstring invalidText = "你好,世界!"d; KOI8RString koi8rText = safeEncodeFromUTF32!KOI8RString(invalidText); assert(cast(ubyte[])koi8rText == ['?', '?', '?', '?', '?', '?']);
See Implementation
Encodes dstring to KOI8RString or KOI8UString. The input does not have to be valid.