How to read unicode (utf-8) / binary file line by line

前端 未结 6 1708
醉酒成梦
醉酒成梦 2020-12-16 15:56

Hi programmers,

I want read line by line a Unicode (UTF-8) text file created by Notepad, i don\'t want display the Unicode string in the screen, i w

6条回答
  •  猫巷女王i
    2020-12-16 16:44

    fgets() can decode UTF-8 encoded files if you use Visual Studio 2005 and up. Change your code like this:

    infile = fopen(inname, "r, ccs=UTF-8");
    

提交回复
热议问题