fix encoding in convert_data