tuning script to change encoding