ILLHILL
Junior Member
 
Netherlands
341 Posts |
Posted - 28 June 2007 : 16:33:05
|
Not really sure what you mean. You want to have the format identified before you read it? (to prevent reading ascii format as unicode?)
This is how my code looks:
write part: CreateTextFile(path+filename+filetype,1,0) If the file already exists, it will overwrite it (value 1), if so, or if not, it will (over)write it in ascii format.
read part: OpenTextFile(path+filename+filetype,1,0,0) In this case the 1 value indicates to only read the file. The first 0 means no new file can be created if the file does not exist yet. (in my code the CreateTextFile covers that part) The second 0 means that it will open the text file as an ASCII file.
This means I have my settings in such a way that it can only create then read files in ascii format. Therefor I have no problems with having to read or identify unicode files.
More info on OpenTextFile: http://www.w3schools.com/asp/met_opentextfile.asp
Greets, Dominic |
CLPPR.com - All The News Only Seconds Away |
 |
|