Pass write_raw() a byte count, not a character count