assume files with given charset are text as well