in reply to Encode text to XML €

Using an encoder such as MIME::Base64 might work better. For example:
use MIME::Base64; $weird = chr(0x2a); $encoded = encode_base64($weird); #$decoded = decode_base64($encoded); $string = "Weird char: $encoded.\n";

This is also easier to read and more flexible than a regexp. :)

--
hiseldl
What time is it? It's Camel Time!