fix script charset code position