Conversation

Converting Delphi 2007 Indy 10.2.3 to Delphi 2009 Indy 10.5.5 [Edit]

(overview of excerpts from articles in conversation)

Newsgroup: embarcadero.public.delphi.internet.winsock

# Lines
wrote on 03-Apr-2009:

Hello,
I am currently attempting to port over a Delphi 2007 project that uses Indy 10.2.3 (very successfully) to Delphi 2009 and Indy 10.5.5 (I just got the latest development build this morning). I think I am running into an encoding issue, but am not sure. Specifically, IDHTTP with SSL calls an old CGI and the CGI returns a .zip file and I then save it to the disk. In 2007 and before this worked perfectly. In 2009, it is not. Here is the examples of the 2 different results (though cut way short in the post) I
am getting back:
2007:
'PK'#3#4#$14#0#0#0#8#0'rLQ9__rPb___'#0#0#0'__'#0#0#0#$C#0#0#0'_default.rtfE__1'#$F'__ '#$14'___w'#$13'__'#3'__'#$13'________________K__k'#$81'J __'#$D'`'#$1D#8'__]______\______\___'#$90'__'#0'__h'#$F#$19'__I4]'#3'J'#$1B'__w__H_____m_____,___________`__z______2_________'#9'6__?__________'#$1E#5'__'#$18'__1_____g__'#$AD'9g______f'#$17#$13'_____________'#$9D'____'#$F'kR'#$7F'X__~__'#5'PK'#3#4#$14#0#0#0#8#0'xTQ9__2__'#$1F'#'#$B#0#0'__1'#0#0#$14#0#0#0'SOAP Note_Croson.rtf__Z{o__8'#$12'_________'#3#$81'__q______'#$11'____c__X'...
111
  
Remy Lebeau (TeamB) replied on 06-Apr-2009:

wrote in message news:✉forums.codegear.com...
  (snip)
Yes, you are having Unicode<->Ansi conversion issues. The way you are using
  Post(), TIdHTTP will decode the raw bytes to Unicode (using any number of
  charsets, none of which are suiable for binary data), and then you are
  assigning that Unicode string to an AnsiString, which will convert the
55
    
James Nagle replied on 07-Apr-2009:

(snip)

Thank you Remy. I appreciate your help.
    
    
    
    
62
FYI: Phrase searches are enclosed in either single or double quotes
 
 
Originally created by
Tamarack Associates
Wed, 18 Dec 2024 23:12:54 UTC
Copyright © 2009-2024
HREF Tools Corp.