How to identify the file content as ASCII or binary

后端 未结 10 2565
旧巷少年郎
旧巷少年郎 2020-11-28 05:54

How do you identify the file content as being in ASCII or binary using C++?

10条回答
  •  难免孤独
    2020-11-28 06:20

    My text editor decides on the presence of null bytes. In practice, that works really well: a binary file with no null bytes is extremely rare.

提交回复
热议问题