Fixed it!
The problem was with the XML encoding string
It should be utf-8 and not Unicode (UTF-8)
What confused me was that using the Code Generation from the Project Browser, the dialog lists Unicode (UTF-8), hence I used that in the script.
However, upon examining a generated XSD schema, I found t should be utf-8, put that in the script and it worked!
My correct call is
projectInterface.GenerateXSD(projectInterface.GUIDtoXML(thePackage.PackageGUID), fileName, "utf-8", "GenGlobalElement=0");
where filename has been obtained as :
var fileName = projectInterface.GetFileNameDialog("", "XML Schema Files (*.xsd)|*.xsd", 1, 2, "C:\\EA-Projects\\", 1);
Cheers
Phil