Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Subject header encoding v. 3.0.2

Help
tnscoder
2012-06-06
2013-05-29
  • tnscoder
    tnscoder
    2012-06-06

    We use blat  for a lot of in house messaging.  After upgrading blat, the subject appears garbled if it contains non English characters.

    I understand the header encoding is fixed according to RFC 2047.  What I find strange is the To: and Subject: headers are encoded differently.  It seems the subject text is first converted to unicode (utf8?), then the text representation of the unicode is encoded to quoted printable.

    In the example below, the To: field and body was handled correctly by the mail reader, but the Subject: field was not.  Coding the Subject: header as base64 did not work either. 

    Do anyone else have problems with the subject not being handled correctly by the receiving mail program?

    • example:
      blat - -server smtp.xx.com -f user1@xx.com -to "test Æ Ø Å <user@gmail.com>" -subject "test Æ Ø Å" -body "test Æ Ø Å" -superdebugT -hdrencq

      Sending stdin.txt to user@gmail.com
      Subject: test +å +ÿ +à

    To: =?iso-8859-1?q?test_=C6_=D8_=C5=00=00user=40gmail=2Ecom=00?= <user@gmail.com>
    Subject: =?iso-8859-1?q?test_=C3=86_=C3=98_=C3=85?=
    Content-Transfer-Encoding: 8BIT
    Content-Type: text/plain; charset=iso-8859-1
    test ã Ï +
    .

     
  • Chip
    Chip
    2012-06-06

    Try changing the -hdrenq option to -charset "utf-8"

    Which flavor of Blat did you run?  32-bit for Windows 2000 and newer, 32-bit for Win9x/ME, or 64-bit?

    If possible, change -superdebugT to -superdebug -overwritelog -log C:\blat.txt
    When you have the log, please send the log and your command line to me at my home email chip dot programmer at att dot net.  That will help me look through the source to see what I might be able to change.

    Chip

     
  • Wowa
    Wowa
    2012-07-09

    This error occurs when your SMTP server does not support 8bitmime.
    In this case, Blat tries encode subject line as UTF7.
    For newest servers Blat encodes it as UTF8 correct.