Convert the value to a byte array using System.Encoding then convert the array to ASCII and save.
When you want to load the string convert it to a byte array then convert it back to your encoding.
That’s really unnecessary. Just save scripts using UTF-8. Text in scripts is always saved as 2 bytes in a build anyway, so there’s no point whatsoever in using ASCII.