Formulator: fix FormToXML with a form encoding on py3
The test from 6316d9bb (Formulator: test form serialization with non ascii elements, 2024-10-24) revealed that form with an encoding other than UTF-8 are not supported.
The test from 6316d9bb (Formulator: test form serialization with non ascii elements, 2024-10-24) revealed that form with an encoding other than UTF-8 are not supported.