Avatar of brgdotnet
brgdotnet
Flag for United States of America asked on

How to tell if a text file has tabs in it ?

How can I tell i a text file has tabs in it? I have  vb.net code, but it is not recognizing the tabs, so I am wondering if there are actually tabs in the text file.
Visual Basic.NET

Avatar of undefined
Last Comment
Dr. Klahn

8/22/2022 - Mon
Dr. Klahn

The legacy method would be to read the text file line by line, parsing each line to see if there is a 0x11 / HT / horizontal tab character in any byte.

Regrettably that method works 100% only in ASCII / UTF-8 source files.  For files encoded in other character sets the situation is more complicated.
brgdotnet

ASKER
Thanks. Is there any editing tool which might physically show the actual tab? I Think the old Word Perfect use to allow for that type of feature. It would be real nice if I could somehow examine the file, and observe the embedded control characters.
ASKER CERTIFIED SOLUTION
Dr. Klahn

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy