convertbuffer() uses the buffer interface's getreadbuffer(), but 't' should use getcharbuffer().
Attach a file by drag & drop or click to upload