The initialization order of the IdHeaderCoder... units is different between
Delphi and C++Builder, causing encoding/decoding problems at run-time in C++
projects because the TIdHeaderCoderPlain class is being used when the
TIdHeaderCoderIndy class should be used instead.
After reviewing the code, the entire IdHeaderCoder sub-system can be completely
removed from Indy. There is adaquate support for the TIdTextEncoding class in
Indy's core, specifically the existing CharsetToEncoding() function, that
IdCoderHeader.pas can now make direct use of TIdTextEncoding with minimal
changes to its algorithms (the only piece that would need to be re-implemented
is to move the TIdHeaderCoderISO2022JP class logic into a new TIdTextEncoding
descendant class, and then have CharsetToEncoding() use it when no OS/Iconv
support is available for Japanese encodings).
This also helps better centralize Indy's text encoding/decoding capabilities by
using TIdTextEncoding more, making future text encoding schemes easier to
implement.
Original issue reported on code.google.com by gambit47 on 29 Jun 2010 at 7:38
Original issue reported on code.google.com by
gambit47
on 29 Jun 2010 at 7:38