I’m executing XQuery requests on an XML file, but some of its elements’s names contain special characters like <espèce>.
When I run my .xqy file, I get the following error :
/project/myfile.xqy
unexpected char: ‘0xFFFD’
How to get rid of this ?
My .xqy file contains :
count(//espèce)
FFFD is the Unicode “replacement character”, it isn’t generally present in the text as a literal character but instead it represents a place where the reader found a byte sequence it couldn’t interpret as a valid character.
In practice this probably means your
.xqyfile is encoded in something like ISO-8859-1 or Windows-1252 but your software is trying to read it as UTF-8.