setting proper encoding