Iirc, you should be able to do this simply:
whatever.write("This is a string", "w")
However I have no idea how you actually change encodings by saving from RMVXP... I still suggest you use utf-8, as I had a bunch of problems using different other files in RMVXP... utf-8 works flawlessly (given the required font characters are installed).
As for the ISO code, it's simply a normed way to save a text document as. it's not a number you have to put anywhere, as it's more or less the name.