search charset on the whole file
credits