Hi All,
If no one has any better ideas I'll just fix the immediate problem by saving the text of the encoding in the files list instead of the index. Anything more complex can wait.
Since Geany doesn't seem to care that the file was loaded with an encoding it doesn't know and it uses the text of the encoding to pass to g_convert() when saving the file there should be no problems.
Cheers Lex