Every character in an XML document is a Unicode character, if there were non-Unicode characters then you really would have problems.
Your actual problem is that the document uses an encoding of Unicode characters, "\u001f", which XML parsers do not recognise. It's perfectly legal XML content, it's just that this is going to be treated as a sequence of 6 characters starting with a backslash, not as a representation of the control character x1F (which, as it happens is not a character that XML 1.0 permits).
One way of dealing with these characters would be to treat "+30 6973222259\u001f" as a JSON string and use the XQuery 3.1 function json-to-xml()
to convert it to XML (it needs to have the enclosing quotes). However this will give you problems if there are escape sequences that convert to characters which XML doesn't permit, such as \u0000
. The json-to-xml()
function has various options for dealing with such situations.