> And also, there is one problem left. When i read a binary file, data is truncated at the charactor EOF. Which character is this: ^D or ^Z? Which operating system - Windows, perhaps? And you are reading from a file, not from stdin? -k