Use binary mode read
@@ -295,7 +295,7 @@ static int grib_tool_without_orderby(grib_runtime_options* options)
if (strcmp(infile->name,"-")==0)
infile->file = stdin;
else
- infile->file = fopen(infile->name,"r");
+ infile->file = fopen(infile->name,"rb");
if(!infile->file) {
perror(infile->name);
exit(1);
