Fix Issue 8877 - std.encoding.transcode is extremely slow