in reply to Map octets to set of characters
Encode to utf7. The utf7 encoding uses only nice printable ascii chars. Of course, it has a very bad compression rate.
Update: here's an example:
outputs:perl -we 'use Encode; print encode("utf7", "Kr\x{151}zus is cs\x{f3}r\ +x{f3} volt hozz\x{e1} k\x{e9}pest.\n");'
Kr+AVE-zus is cs+APM-r+APM- volt hozz+AOE- k+AOk-pest.
Update: this is for unicode strings of course, it's not ideal for binary data.
Update: For binary data, a very good way is to use MIME::Base64, which is in the core with newer perl versions.
|
|---|