add right encoding for input file