In my script, I want to read the information from a text file. 

As it is going to read from any text file on the disk, I have no clue whether 
the actual text file will be an ASCII, or an Unicode file. I am using the 
CreateTextFile method to open the text file. This method does require me to 
determine if I am going to open one or the other of the file formats. Is there 
any good work around for this in VBS? Some way for me to open a text file, and 
have it properly read, no matter which of the two formats it has been saved in?

>From my testing here, I get the following results. Try to open an ASCII file, 
>having CreateTextFile set to UniCode, only gives me one line, and no 
>recognized text. 

Try to open an UniCode file, having CreateTextFile set to ASCII, will recognize 
all the lines, but does not work properly when I try to perform textual 
operations; like Mid, and InStr.

Yep, even computers have their multi-lingual challenges. Smile.

Anyone has a good idea here, I would be thankful.

Reply via email to