Allocates a new string buffer containing the first n bytes of str converted to UTF-8.
n
str
string in locale charset
number of bytes to convert
a new string buffer containing the first n bytes of str converted to UTF-8.