In an XML to Domain mapping, does Mendix automatically select the correct encoding?
0
In the communication between two of our applications, we send an XML containing the letter "é" using UTF-8 encoding. (Header: <?xml version="1.0" encoding="UTF-8"?>) This works completely fine and no errors occur. However, when we send the same XML to an outside party, we get an error: "here is an error in XML document, -XXXXX- contains invalid UTF8 bytes." I would expect the same error to occur in the communication between Mendix applications, but maybe because it's Mendix to Mendix traffic, the backend overwrites the encoding somehow, or selects another type of encoding if it fails. Has anybody seen this before?
asked
Pjotr Sebek
2 answers
0
Please specificy what you mean with sending an XML? Are you talking about webservices or just a file?
answered
Nick van Wieren
0
Character "é" is a valid character UTF-8 encoding. It will produce 2 bytes (0303 0251) in the raw content which shows that the information is still intact. We even test it with Hindi character and Japanese without issue. Could you verify in the server side if it is parsing it correctly with UTF-8?