Convert UTF-16 to UTF-8 under Windows and Linux, in C

前端 未结 8 726
不思量自难忘°
不思量自难忘° 2020-12-01 02:50

I was wondering if there is a recommended \'cross\' Windows and Linux method for the purpose of converting strings from UTF-16LE to UTF-8? or one should use different method

8条回答
  •  春和景丽
    2020-12-01 03:39

    If you have MSYS2 installed then the iconv package (which is installed by default) lets you use:

     iconv -f utf-16le -t utf-8 output.txt
    

提交回复
热议问题