Adjust encoding operations so that encoding is explicit at the call site, and all strings written to I/O are ASCII-8BIT.