HARD has asked for the wisdom of the Perl Monks concerning the following question:

Hi , i want to ask about Text encoding ...
i've Arabic Text and i want to encode it to send it via email form to SMS GATEWAY How to encode it ?? Thanks

Replies are listed 'Best First'.
Re: Converting Text to unicode
by borisz (Canon) on Jan 25, 2005 at 17:07 UTC
    Without testing and Assume, that your input data is in iso-8859-6 ( Arabic ) hopefully.
    perl -Mencoding=iso-8859-6,stdout,utf-8 -pe1 <infile >outfile
    Boris
Re: Converting Text to unicode
by halley (Prior) on Jan 25, 2005 at 16:53 UTC
    I don't specifically know what is common in the way of non-Unicode encodings of Arabic text. The essential thing about email is that each email message is generally written with an ASCII or UTF-8 encoding, and that anything that is not in that format needs to be wrapped as a MIME "attachment" block. The email client then inspects those MIME headers to make sense of your message.

    You might want to see my FMTYEWTK about Characters vs Bytes for a generic primer to Unicode (and how Unicode itself isn't exactly an encoding).

    --
    [ e d @ h a l l e y . c c ]

Re: Converting Text to unicode
by Anonymous Monk on Jan 25, 2005 at 17:41 UTC
    uudecode it. All SMS capable phones are capable of displaying the characters used by uudecode.