Judge file encoding