in reply to Encoding horridness

Unfortunately, you haven't provided enough information. How do you include the non-ascii characters into the XML?

The following creates a well-formed XML:

#!/usr/bin/perl
use warnings;
use strict;
use utf8;
 
binmode STDOUT, ':encoding(UTF-8)';
print "<?xml version='1.0' encoding='utf-8'?><áéíóůÿ/>";

Note the utf8 which interprets the characters in the right way. If you're reading the characters from a file, you need to specify the :encoding(UTF-8) layer for it, as well. Etc.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Encoding horridness
by Anonymous Monk on Jul 12, 2017 at 13:57 UTC

    A careless reader might see "utf8 interprets the characters in the right way" and get the idea that it's going to fix all their utf8 woes. To be clear, use utf8 only changes how perl reads your program source code -- probably just your string literals.

      The "the" in "the characters" means I referenced the characters in the element name. utf8 changes how Perl reads your program source, but it does more than string literals:
      #!/usr/bin/perl use warnings; use strict; use feature qw{ say }; use utf8; my $á = 123; say $á;
      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

        Not disputing your facts, just trying to clarify. I figured the OP probably didn't have any unicode variable names in his existing program.