How to identify the file content as ASCII or binary

后端 未结 10 2564
旧巷少年郎
旧巷少年郎 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:12

    Github's linguist uses charlock holmes library to detect binary files, which in turn uses ICU's charset detection.

    The ICU library is available for many programming languages, including C and Java.

提交回复
热议问题