Paul wrote: >> In D2009 the type "string" is mapped to UnicodeString. If you want >> ansi string, just use type AnsiString. > > yes, but HttpCli.Url is a string, which would be a unicodestring in > D2009. > The only option is to change all "String" to "AnsiString" and > "PChar" to "PAnsiChar" in ICS V6.
There is a much cleaner and faster option. The component should use UnicodeString internally but send AnsiString. IcsV7 follows this concept. Overloads have been added to TWSocket.SendStr(): function SendStr(const Str : RawByteString) : Integer; overload; virtual; ( RawByteString is a special AnsiString type ) function SendStr(const Str : UnicodeString; ACodePage: Cardinal) : Integer; overload; virtual; (Converts the UnicodeString to Ansi with destination code page ACodePage. passing CP 1200 sends UTF-16) function SendStr(const Str : UnicodeString) : Integer; overload; virtual; ( Converts the UnicodeString to Ansi with default system code page CP_ACP) -- Arno > Paul > > > ----- Original Message ----- > From: "Francois PIETTE" <[EMAIL PROTECTED]> > To: "ICS support mailing" <[email protected]> > Sent: Wednesday, September 24, 2008 7:54 AM > Subject: Re: [twsocket] D2009 and ICS V6 Ansi > > >>> I'm planning to upgrade to D2009 for the unicode UI. >>> However, I want all communications in Ansi. >>> How can this be done ? >> >> Just as usual. TWSocket.Send will send whatever you use. if you pass >> the address of an AnsiString, then you'll send ansi. If you pass the >> address of >> a UnicodeString you'll send Unicode. You do whatever you like. >> >> In D2009 the type "string" is mapped to UnicodeString. If you want >> ansi string, just use type AnsiString. >> >> -- >> [EMAIL PROTECTED] >> The author of the freeware multi-tier middleware MidWare >> The author of the freeware Internet Component Suite (ICS) >> http://www.overbyte.be >> >> -- >> To unsubscribe or change your settings for TWSocket mailing list >> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket >> Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
