fix script encoding