I have a problem with which I have already spent a lot of time and I cannot find a solution although I intuitively feel that there is a very easy solution for it. I am completely stucked.
Here is the problem:
I have a file about which I do not know anything (neither its character set) and I want to read the whole file into a memory buffer.
I have already tried fread, fgets (fgetws), getline, streams, etc. The problem is that all those functions and techniques stop reading of the file as soon as they find 00x0 which they consifer for EOF.
Does anybody have an idea what I am doing wrong?
Here is the problem:
I have a file about which I do not know anything (neither its character set) and I want to read the whole file into a memory buffer.
I have already tried fread, fgets (fgetws), getline, streams, etc. The problem is that all those functions and techniques stop reading of the file as soon as they find 00x0 which they consifer for EOF.
Does anybody have an idea what I am doing wrong?