in reply to Encoding issue

XML without an explicit encoding declaration must be UTF-8, but depending on your interpretation of the spec, UTF-16 and UTF-32 are allowed if you use a BOM.

If your encoding is not UTF-8|16|32, you're out of luck. There is NO reliable way to guess charset.

Juerd # { site => 'juerd.nl', do_not_use => 'spamtrap', perl6_server => 'feather' }