90fbe52841
decoder.write() can hold incomplete multi-byte sequences internally. Without calling decoder.end() after streams close, those trailing bytes are silently dropped. Flush all decoders after process exit so any remaining bytes are emitted as replacement characters rather than lost.