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,
In reply to Re: Encoding horridness
by choroba
in thread Encoding horridness
by jfrm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |