[Qt-interest] How to check between "Text" and "Non-Text"

yogesh upreti yogesh.upreti at gmail.com
Tue Apr 20 10:45:29 CEST 2010


Hallo All,
Thanks a lot for all the replys.

@Frederic:
 I am using right now readline method to read the file, and it's not working
very nicely for binary data (probably it is looking for LF or CR)
which method should I use for reading file which will give me no difference
between normal and binary file? Also I don't wanna scan the whole file
through, How much data should I read to find a good comparision for ?

 @Wachter:
Where can I find source for "file" command may be reading only header could
be sufficient for me. I was looking something like this because with this I
don't have to read the whole file through, because some binary files are
huge (2-3 GB).

Does anyone knows what logic programmes like Notepad/WordPad use to find out
if it is a Text or Non-Text file?

Thanks a lot
Yogesh Upreti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100420/589e9b2f/attachment.html 


More information about the Qt-interest-old mailing list