in reply to how to handle special characters in XML?

Those are not errors, but warnings. print is letting you know that it is trying to print a unicode character to a non-unicode filehandle. Your console is not seen as a unicode filehandle. You can fix this by stating that you want STDOUT to be considered a unicode filehandle by adding the following line before the print:

binmode STDOUT, ":utf8";

BTW a few of comments: