converting UNICODE to ASCII before writing to a file