buffer: limit write length
buffer: write unsigned chars
buffer: always use raw string data