www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - read files


I'm writing an application that reads all kind of text files.
I'm not really familiar with the filetypes.
For the moment I read them with a BufferedFile.

Stream br = new BufferedFile(fileName);

But that causes a lot of trouble. I managed to figure out how to read a file 
his BOM and so It'll also be possible I presume to convert them to a type 
(UTF8 for example) that I always use. But for a lot of files when I check 
the BOM I get result -1 (meaning the
May 13 2007