take-cheeze/rgss_script_editor — pull request #7 by Ancurio (2013-09-11 10:07:07+00:00)
Title: Custom marshalling

As discussed, I implemented custom marshalling code to support both XP/VX and VX Ace. (Took me one 徹夜 :D)

When reading, the format is detected automatically. When writing, the format to write in is deduced from the file extension (so saving to file extensions other than rxdata/rvdata/rvdata2 does not work atm, the format would have to be explicitly specified by the user).
I tested this with both XP games and VX Ace games, which worked without any problems with the files written by rgss_script_editor. VX Ace seems to always encode all its strings in UTF8 by the way.

The error messages generated when reading are not very helpful atm. (mostly "Bad format"), of course this can always be improved later.
I tried my best to follow the coding conventions I could recognize from your code. If anything is not okay, just tell me and I'll fix it.

I also had to fix some of the UI code to respond better to Open/Close combinations to test my marshalling code, so that's an added bonus I guess.

Oh, and I left the Ruby code in as I assume you were planning to still use it for syntax verification.