Re: [twsocket] D2009 and ICS V6 Ansi

2008-09-26 Thread Paul
 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.
Probably others too (fi Stringlist, TStrings and ...)

Paul


- Original Message - 
From: Francois PIETTE [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
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


Re: [twsocket] D2009 and ICS V6 Ansi

2008-09-26 Thread Olivier Sannier
Francois Piette 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.
 

 This doesn't cause any problem. You can pass an AnsiString where an
 UnicodeString is requested. The compiler will do the transformation
 automatically for you.

 Usually, a program can be recompiled with Delphi 2009 with no change and it
 works ! Changes are needed if your code assume chars are byte values (sizeof
 / length) or use strings for something which is not really a string.
I think he is concerned about the fact that the property being 
UnicodeString it would be transferred to the HTTP server as a UTF-16 
string, which obviously is not supported by the server.
-- 
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


Re: [twsocket] D2009 and ICS V6 Ansi

2008-09-26 Thread Arno Garrels
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 twsocket@elists.org
 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


Re: [twsocket] D2009 and ICS V6 Ansi

2008-09-26 Thread Angus Robertson - Magenta Systems Ltd
 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.
 Probably others too (fi Stringlist, TStrings and ...)

ICS V6 is not supported under Delphi 2009. Arno and Francois spent many
weeks developing and testing V7 to work under Delphi 2009, and I'm sure
you don't want to repeat all that work, most units changed in minor ways,
some needed major changes.  All ICS components work now, but there is
still a lot of testing to be done. 

I've also spent a few weeks updating many of my own components (RAS, WMI,
Internet Helper, etc) to Delphi 2009, as well as updating my ICS related
components, and it is all slow and tedious with errors occurring where
the compiler does not warn you, specifically any use of pointers for
string handling.   

I'm unlikely to convert any of my own applications to Delphi 2009 in the
near future, mainly due to all the third party libraries I use, few of
which are available for Delphi 2009, and those that are may not be
properly tested (like the Turbopower components). 

Angus
 
-- 
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


Re: [twsocket] D2009 and ICS V6 Ansi

2008-09-26 Thread Francois Piette
  Usually, a program can be recompiled with Delphi 2009 with no change and
it
  works ! Changes are needed if your code assume chars are byte values
(sizeof
  / length) or use strings for something which is not really a string.

 I think he is concerned about the fact that the property being
 UnicodeString it would be transferred to the HTTP server as a UTF-16
 string, which obviously is not supported by the server.

Of course the ICS component  take care of what the standard specifies !
No matter if the URL is Unicode as long as he uses only ansi characters as
he has done before.

--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
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


Re: [twsocket] D2009 and ICS V6 Ansi

2008-09-26 Thread Paul
I can try to use ICS V6 with D2009 and make all  the neccesary changes to 
use unicode characters in both clients and servers.
Taking into account the SizeOf(Char) every everywhere (like getmem to use 
with strings).
Then only UrlEncode/Decode won't work with unicode characters with a 
non-ansi codepage.
If this would work, then I can proceed.
I can't use ICS V7 though, I'm prohibited to use beta software.

thanks,

Paul


- Original Message - 
From: Francois Piette [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Friday, September 26, 2008 1:26 PM
Subject: Re: [twsocket] D2009 and ICS V6 Ansi


  Usually, a program can be recompiled with Delphi 2009 with no change 
  and
 it
  works ! Changes are needed if your code assume chars are byte values
 (sizeof
  / length) or use strings for something which is not really a string.

 I think he is concerned about the fact that the property being
 UnicodeString it would be transferred to the HTTP server as a UTF-16
 string, which obviously is not supported by the server.

 Of course the ICS component  take care of what the standard specifies !
 No matter if the URL is Unicode as long as he uses only ansi characters as
 he has done before.

 --
 [EMAIL PROTECTED]
 Author of ICS (Internet Component Suite, freeware)
 Author of MidWare (Multi-tier framework, freeware)
 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


Re: [twsocket] D2009 and ICS V6 Ansi

2008-09-26 Thread Arno Garrels
Paul wrote:
 I can try to use ICS V6 with D2009 and make all  the neccesary
 changes to use unicode characters in both clients and servers.
 Taking into account the SizeOf(Char) every everywhere (like getmem to
 use with strings).
 Then only UrlEncode/Decode won't work with unicode characters with a
 non-ansi codepage.

Non-ASCII characters, those above #127, are not allowed in an URL
(http://en.wikipedia.org/wiki/Percent-encoding) that has not changed.
As far as I understand rfc3986 (http://tools.ietf.org/html/rfc3986) 
any character above #127 has to be encoded UTF-8 then percent-encoded.

 If this would work, then I can proceed.
 I can't use ICS V7 though, I'm prohibited to use beta software.

Don't you think that you would just produce another beta?
Your time would be better invested in Icsv7.   

--
Arno Garrels
 
 thanks,
 
 Paul
 
 
 - Original Message -
 From: Francois Piette [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Friday, September 26, 2008 1:26 PM
 Subject: Re: [twsocket] D2009 and ICS V6 Ansi
 
 
 Usually, a program can be recompiled with Delphi 2009 with no
 change and
 it
 works ! Changes are needed if your code assume chars are byte
 values (sizeof / length) or use strings for something which is not
 really a string. 
 
 I think he is concerned about the fact that the property being
 UnicodeString it would be transferred to the HTTP server as a UTF-16
 string, which obviously is not supported by the server.
 
 Of course the ICS component  take care of what the standard
 specifies ! No matter if the URL is Unicode as long as he uses only
 ansi characters as he has done before.
 
 --
 [EMAIL PROTECTED]
 Author of ICS (Internet Component Suite, freeware)
 Author of MidWare (Multi-tier framework, freeware)
 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


Re: [twsocket] D2009 and ICS V6 Ansi

2008-09-24 Thread Paul
 Seriously, I do not understand this question.

The httpserver has to do a lot of string processing internally and this 
would be faster with ansi (no need for unicode here)
I think there are also a lot of modifications to do, fi:
-UrlEncode/decode
-ExtractUrlEncodedValue() ..
I'm also prohibited to use beta software, so ICS V7 is not an option for me.

Paul


- Original Message - 
From: Arno Garrels [EMAIL PROTECTED]
To: ICS support mailing twsocket@elists.org
Sent: Tuesday, September 23, 2008 11:18 PM
Subject: Re: [twsocket] D2009 and ICS V6 Ansi


 Paul wrote:
 I'm planning to upgrade to D2009 for the unicode UI.

 Yeah, D2009 rocks :-)

 However, I want all communications in Ansi.
 How can this be done ?

 Simply by sending and receiving ANSI data exclusively ;-)
 Seriously, I do not understand this question.

 --
 Arno Garrels

 -- 
 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


Re: [twsocket] D2009 and ICS V6 Ansi

2008-09-24 Thread Arno Garrels
Paul wrote:
 Seriously, I do not understand this question.
 
 The httpserver has to do a lot of string processing internally and
 this would be faster with ansi 

It depends, RTL functions calling the Win32 W-API with UnicodeString 
internally, for instance, AnsiUpperCase/AnsiLowerCase are much
faster than in D2007. The larger memory footprint of UnicodeString
slows down string allocation time a little bit, but that's really
no big deal. But you should avoid too many conversions between Unicode 
and ANSI. The concept is to convert AnsiStrings to UnicodeString
at the lowest possible level and do all string operations in Unicode.

 (no need for unicode here)

Are you sure? Even if you do not localize the unicode-aware
application it can run on virtually any Windows version on earth.

 I think there are also a lot of modifications to do, fi:
 -UrlEncode/decode
 -ExtractUrlEncodedValue() ..
 I'm also prohibited to use beta software, so ICS V7 is not an option
 for me. 

ICSv7 is beta/alpha and there is still some work to do. Also all of your
third-party components need to support D2009. You cannot use components
written for D2007. It will probably take a while until all vendors 
support D2009. 

--
Arno 

 
 Paul
 
 
 - Original Message -
 From: Arno Garrels [EMAIL PROTECTED]
 To: ICS support mailing twsocket@elists.org
 Sent: Tuesday, September 23, 2008 11:18 PM
 Subject: Re: [twsocket] D2009 and ICS V6 Ansi
 
 
 Paul wrote:
 I'm planning to upgrade to D2009 for the unicode UI.
 
 Yeah, D2009 rocks :-)
 
 However, I want all communications in Ansi.
 How can this be done ?
 
 Simply by sending and receiving ANSI data exclusively ;-)
 Seriously, I do not understand this question.
 
 --
 Arno Garrels
 
 --
 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


[twsocket] D2009 and ICS V6 Ansi

2008-09-23 Thread Paul
I'm planning to upgrade to D2009 for the unicode UI.
However, I want all communications in Ansi.
How can this be done ?

thanks,

Paul
-- 
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


Re: [twsocket] D2009 and ICS V6 Ansi

2008-09-23 Thread Arno Garrels
Paul wrote:
 I'm planning to upgrade to D2009 for the unicode UI.

Yeah, D2009 rocks :-)

 However, I want all communications in Ansi.
 How can this be done ?

Simply by sending and receiving ANSI data exclusively ;-)
Seriously, I do not understand this question.

--
Arno Garrels
 
-- 
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


Re: [twsocket] D2009 and ICS V6 Ansi

2008-09-23 Thread Francois PIETTE
 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