in reply to Question about Encode utf8 within email
HTML::Entities may be what you are looking for: HTML::Entities - Encode or decode strings with HTML entities.