I think I've just found the problem! I'm using ubuntu 7.04, the problem is present in the CVS snapshot (I used 20070606).
I added some more traces around the code, and found that the method CFileDataIO::ReadTag does not properly fill the name property of the returned tag object.
The ReadString call inside this method does not convert the name to unicode. Name is tipically a 1char string, where the char is something like 0xFF / 0xFE, not a human readable "name".
I used this very dumb and broken code as a workaround, I'm sure that you can do better than this:
// name = ReadString(false);
{
uint32 len = ReadUInt16();
unsigned char val[len + 1];
val[len] = 0;
Read( (void*)val, len );
printf("Tag len: %d Buf: %s\n", len, val );
name= wxT("X");
name[0]= val[0];
}
With this change, aMule CVS snapshot works like a charm.