windowsencodingcmdhebrewblat

Blat hebrew encoding


I have problem with hebrew encoding in blat. I use this command in specific windows program:

blat $mailfile -charset "UTF-8" -subject "$subjectALL" -f $sender -to $receiver -cc $blind -attach "$6" > $blatoutput

My problem is when email come it have wrong subject charecters. I try fix it by changing -charset in command to windows-1255/ISO8859/OEM 862 but nothing help.

I want to see correct hebrew characters in mail subject.


Solution

  • RFC does not allow 8bit characters in the envelope. You should convert the subject text to base64 encoded string:

    export x=`base64 <<EOF
    $subjectALL
    EOF`
    blat $mailfile -charset "UTF-8" -subject "=?UTF-8?B?$x" -f $sender -to $receiver -cc $blind -attach "$6" > $blatoutput