7a7ec178b9
Previously we used formatting, which is a virtual call and quite the detour. Now copy the utf-8 encoding code from Rust (thank you Alex Crichton) and use that.