title: How to identify all non-basic UTF-8 characters in a set of strings in perl
body: <p>I'm using perl's XML::Writer to generate an import file for a program called OpenNMS. According to the <a href="http://www.opennms.org/wiki/Importer_Service" rel="nofollow">documentation</a> I need to pre-declare all special characters as XML ENTITY declarations. Obviously I need to go through all strings I'm exporting and catalogue the special characters used. What's the easiest way to work out which characters in a perl string are "special" with respect to UTF-8 encoding? Is there any way to work out what the entity names for those characters should be?</p>