Make buffer offset spec reliable

Same as for offset spec - avoid creating invalid UTF-8.