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.
17 jobs for zope4py3 in 0 seconds
Status Job ID Name Coverage
  External
passed ERP5.CodingStyleTest-Zope4Py3

02:26:26

passed ERP5.CodingStyleTest-Zope4Py3-py2

02:03:58

failed ERP5.UnitTest-Zope4Py3

02:04:37

passed ERP5.UnitTest-Zope4Py3-Py2

04:12:50

passed ERP5.CodingStyleTest-Zope4Py3

01:18:50

passed ERP5.CodingStyleTest-Zope4Py3

01:22:11

passed ERP5.CodingStyleTest-Zope4Py3-py2

01:21:29

passed ERP5.CodingStyleTest-Zope4Py3-py2

01:05:07

failed ERP5.UnitTest-Zope4Py3

02:14:50

canceled ERP5.UnitTest-Zope4Py3

failed ERP5.UnitTest-Zope4Py3

04:53:26

failed ERP5.UnitTest-Zope4Py3

04:38:58

canceled ERP5.UnitTest-Zope4Py3

04:29:25

failed ERP5.UnitTest-Zope4Py3

02:02:18

canceled ERP5.UnitTest-Zope4Py3

failed ERP5.UnitTest-Zope4Py3-Py2

02:42:14

passed ERP5.UnitTest-Zope4Py3-Py2

02:51:07