utf8 encode for json output