What about the symmetric `s = buf.decode('utf-8')` call a hundred lines above? Does it need to be changed as well?