auto determind encoding and font