Allocates a new string buffer containing str converted to the user's locale charset.
str
string in UTF-8 charset
a new string buffer containing str converted to the user's locale charset.