use buffer size of utf8 string