is file text.txt a text file?

Discuss any general programming issues here
Post Reply
sashapont
Posts: 87
Joined: Thu Aug 03, 2017 2:49 pm

is file text.txt a text file?

Post by sashapont » Sun Aug 05, 2018 7:01 pm

How I can check that file text.txt is plain text file?

User avatar
airsoftsoftwair
Posts: 2668
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: is file text.txt a text file?

Post by airsoftsoftwair » Mon Aug 06, 2018 10:52 pm

Checking for a unprintable characters is a typical way of determining whether a file contains binary or text data. IsPrint() could come in handy here.

Post Reply