TIdDecoderMIME (Uneven size in DecodeToStream)

Giganews Newsgroups
Subject: TIdDecoderMIME (Uneven size in DecodeToStream)
Posted by:  David S. (no@spam.please)
Date: Mon, 1 Sep 2003

  I'm using TIdDecoderMIME from C++ Builder 6 UP 4, Indy 9.0.14. It reports
an error: "Uneven size in DecodeToStream.". This is a peace of C++ code:

String __fastcall Decode(String cInput)
{
  TIdDecoderMIME *pDecoder = new TIdDecoderMIME(NULL);
  String cResult;
  try {
    try {
      cResult = pDecoder->DecodeToString(cInput);
    } __finally {
      delete pDecoder;
    }
  } catch (Exception &e) {
    Error(e.Message);
    return "";
  }
  return cResult;
}

    Well, it works fine except decoding this:

MIIDCzCCAfOgAwIBAgICAKkwDQYJKoZIhvcNAQEFBQAwQDEQMA4GA1UECxMHRGVtbyBDQTEOMAwG
A1UECxMFU0ktQ0ExDzANBgNVBAoTBlNFVENDRTELMAkGA1UEBhMCU0kwHhcNMDIxMDMwMTIzMDM0
WhcNMDMxMDMwMTIzMDM0WjA8MQswCQYDVQQGEwJTSTEPMA0GA1UEChMGU0VUQ0NFMRwwGgYDVQQD
ExNhbnNwaXJpeC5zZXRjY2Uub3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCti+gwRgQM
fwbt644cyA/pNXszGh+KAKEetK39TotpSTPBudb4z6ughg8N7VDPbAhjI+YEBo/6SMIfGhrmgmDi
4Sq4d4W6zpWRlc4dhZ1NNVtxrv+EXnjUndiTl+5taXMblTV+NR+ylJIBlRiZoZSoawlbBEMOPya0
kx5rhTQ+gwIDAQABo4GWMIGTMCAGCWCGSAGG+EIBDQQTFhFOT1QgQVVUSEVOVElDQVRFRDARBglg
hkgBhvhCAQEEBAMCAEAwDAYDVR0TAQH/BAIwADAOBgNVHQ8BAf8EBAMCBLAwHQYDVR0OBBYEFDwJ
SIFzQrY8nLARBVFL/krEQ59NMB8GA1UdIwQYMBaAFAxudGd8OZKPkwBuoby5yiSTLkS2MA0GCSqG
SIb3DQEBBQUAA4IBAQBMxq2vEA0/8f0szAbCzkQpxo4NjkPRhQuiUvGN7N+ATYzYT4Qx1m6fCdpG
0Ei81pOvr0VfP9KzE8zMPyyj5tQsJ6n+aLpmiRjCDtZcDQ4E7rTTCCXL4JlQHX9ZmLeKxwWJTQbS
V3TSzHewi18cbxzH/8aQV6wbKOHkg6X9ceL/Qo/gUoc2ujTAnD8M602cNi2AfgVTx2zO0TX18dpp
SpmtwvbplX94S4wKYBbxzqqWhqwBUOaH1VW4empkQcyy8F8+iQtyWpMQKwJnhHjNnI+vm7fnvIXy
05YeFPn+zrGp9yhdIYtc7b+WUlJexXAEliGpogW71mqjH/6q9s+jUDYE

    This was working fine, before upgrading from standard Indy components
that ships with BCB6 to the new Indy 9.0.14.

Replies