Filenames starting with a digit are stored percent encoded in xmlDoc.URL
I used http://www.xmlsoft.org/examples/parse1.c to reproduce the problem. Just add
fprintf(stderr, "%s\n", doc->URL);
before the xmlFreeDoc(doc);
.
Then create the following XML files with any well-formed content:
a:2.xml
1:b.xml
1%3Ab.xml
The program outputs the following URLs:
a:2.xml
1%3Ab.xml
1%3Ab.xml
It seems to really depend on the first character of the name, as changing the argument to ./1:b.xml
cancels the encoding.