get data from csv file and auto encoding