fixed UTF-16 to UTF-8 conversion without iconv