mtp: encode string length as number of code points, not bytes.