Indy Subject encoding bug

Giganews Newsgroups
Subject: Indy Subject encoding bug
Posted by:  Mekashron (in…@mekashron.com)
Date: Sun, 7 Jan 2007

Hello,

I have found that indy don't send subject correctly when its sent in other langage then english.

I have fixed the bug:
In IdMessage lines should be changed to:

with LastGeneratedHeaders do
  begin
    {CC: If From has no Name field, use the Address field as the Name field by setting last param to True (for SA)...}
    IdEncoderMIME := TIdEncoderMIME.Create;
    Values['Subject'] := '=?'+CharSet+'?B?' + IdEncoderMIME.Encode(Subject) + '=?=';    IdEncoderMIME.Free;
    Values['To'] := EncodeAddress(Recipients, HeaderEncoding, TransferHeader, ISOCharSet); {do not localize}
    Values['Cc'] := EncodeAddress(CCList, HeaderEncoding, TransferHeader, ISOCharSet); {do not localize}

Replies