use sizeof(s) rather than length(s.data) for UTF8 strings; thanks @loladiro