text handling for files with binary chars