We do this by forcing a UTF-8 byte order marker in the profile.xml file.
We also add processing instructions that specify UTF-8, although it seems the BOM is itself sufficient.
file.open() checked everywhere except in loaders.
qWarning() message written to debug log, with error number and text.
We may want to exit OSCAR with a message in many situations, but that is not implemented yet.
Set number of debug logs to be kept for Release version to 4.