Quote:
I need to check if the file selected by the user is a text file
The only way I see is reading the file and check if contain match your criteria.
I fear you have to write your own utility.
First, you need to define what is text for you:
English is mostly lower 128 ASCII, but under 32, one can argue that it is not text expect for CR and LF.
But English also include words from other languages like "déjà vu" which comes from French.
When I use csv files, I replace commas with tabs (ASCII 9), is it text for you ?
If file comes from DOS, text that use codes above 128 are perfectly normal for Europeans.
File can also use UTF encoding.