Re: [twsocket] Posting unicode data in HTTP Post

2008-11-21 Thread Irfan Mulic
Hi,

Thanks for your help, but still I am not getting the same results when I do
post to php script.

This is PHP script

>  echo "Note = ". $_POST['note'];
>
> if($_POST['action'] == 'i')
>  {
>   /*
>   * This code will add new notes to the database
>   */
>   $sql = "INSERT INTO app_notes VALUES ('', '" .
> mysql_real_escape_string($_POST['username']) . "', '" .
> mysql_real_escape_string($_POST['note']) . "', NOW(), '')";
>   $result = mysql_query($sql, $link) or die('0 - Ins');
>   echo '1 - ' . mysql_insert_id($link);
> ?>
>
and this is the delphi code:
 data := Format('date=%s&username=%s&password=%s&hash=%s¬e=%s&action=%s',
[UrlEncode(FormatDateTime('mmddhh:nn',now)),
UrlEncode(edtUserName.Text),  UrlEncode(getMd5(edtPassword.Text)),
UrlEncode(getMd5(dataHash)),UrlEncode(Utf8Encode(memoNote.Text)),'i'  ]); //
try function StrHtmlEncode (const AStr: String): String; from IdStrings
HttpCli1.SendStream := TMemoryStream.Create;
HttpCli1.SendStream.Write(Data[1], Length(Data));
HttpCli1.SendStream.Seek(0, 0);  HttpCli1.RcvdStream :=
TMemoryStream.Create;  HttpCli1.URL := Trim(ActionURLEdit.Text);

  HttpCli1.PostAsync;


But the PHP script is getting totaly different characters ?
Any clue what this can be?
Thanks.
-- 
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] Posting unicode data in HTTP Post

2008-11-20 Thread Arno Garrels
Irfan Mulic wrote:
> Yes it is Tnt Memo. I am using widestring from Tnt, I was thinking
> that Tnt is in utf-8?
> 
> Anywhay if I use urlencode on the character from Tnt Memo I am
> getting '?' as result.

That's easy to explain. UrlEncode takes a AnsiString, memoNote.Text 
is of type WideString. Assigning a WideString to a String causes
an implicit and silent conversion from WideString to AnsiString
which uses the default system code page. However if the WideString 
contained any character that cannot be converted to the current ANSI
code page those characters are replaced by question marks.

So UrlEncode(Utf8Encode(memoNote.Text)) should do the trick.

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html


  
> 
> What should solve my problems with posting from Tnt Memo using ICS?
> 
> On Thu, Nov 20, 2008 at 12:24 PM, Arno Garrels <[EMAIL PROTECTED]>
> wrote: 
> 
>> Irfan Mulic wrote:
>>> So this is ansiChar is not widechar this is all in range of ansi
>>> characters...
>> 
>> Why should one display UTF-8 strings in a AnsiString memo?
>> Anyway just to be sure, UTF-8 is a AnsiString (one byte element
>> size of the data array), WideString contains UTF-16 data with two
>> byte element size of the data array.
>> Question: Does memoNote.Text contain UTF-8 or UTF-16?
>> Maybe it's a TNT memo which contains WideStrings?
>> 
>> --
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>> 
>>> 
>>> yes it is ICS issue, do you know is it fixed in newer versions?
>>> 
>>> On Thu, Nov 20, 2008 at 11:25 AM, Arno Garrels <[EMAIL PROTECTED]>
>>> wrote:
>>> 
 Irfan Mulic wrote:
> Hi,
> 
> Here is code:
> 
>  data :=
> Format('date=%s&username=%s&password=%s&hash=%s¬e=%s&action=%s',
>  [UrlEncode(FormatDateTime('mmddhh:nn',now)),
>  UrlEncode(edtUserName.Text),
>  UrlEncode(getMd5(edtPassword.Text)),
>  UrlEncode(getMd5(dataHash)),UrlEncode(memoNote.Text),'i'
>  ]);
 
 GetMD5() doesn't look like an ICS function since there is no
 overloaded GetMD5() in v5 that takes a string.
 
> 
> This memoNote.text is utf-8 this doesn't work with unicode
> characters?
 
 It works as URL encoding should work:
 Characters '0'..'9', 'A'..'Z', 'a'..'z' are left untouched,
 any Char outside these rages are encoded "'%' +
 IntToHex(Ord(AnsiChar))"
 
 It does not look like an ICS issue to me?
 
 --
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 
 
 
> Is it fixed in new versions?
> 
>  HttpCli1.SendStream := TMemoryStream.Create;
>  HttpCli1.SendStream.Write(Data[1], Length(Data));
>  HttpCli1.SendStream.Seek(0, 0);
>  HttpCli1.RcvdStream := TMemoryStream.Create;
>  HttpCli1.URL := Trim(ActionURLEdit.Text);
>  HttpCli1.PostAsync;
> 
> Thanks.
> 
> Irfan
> On Thu, Nov 20, 2008 at 8:59 AM, Arno Garrels
> <[EMAIL PROTECTED]> wrote:
> 
>> Irfan Mulic wrote:
>>> I am using V5, first link on download page.
>> 
>> Ah, ok.
>> 
> I am having troubles to work with unicode data ?
>> 
>> What kind of problems do you have exactly? Can you show some
>> code? With POST you just write data to a stream which is send as
>> is. There is an example how to post multi-byte form data on the
>> User-Made page on ICS website.
>> 
>> --
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>> 
>>> 
>>> On Thu, Nov 20, 2008 at 5:26 AM, Arno Garrels
>>> <[EMAIL PROTECTED]> wrote:
>>> 
 Irfan Mulic wrote:
> Hi,
> 
> I start using ICS components and I really like them.
 
 Which ICS version are yuo using?
 
 --
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 
> 
> I am having troubles to work with unicode data ?
> 
> Can I get more info is this supported and can I get some
> examples of it.
> 
> I am using example httppost with Delphi 7.
> 
> Thank you.
> 
> 
> --
> Irfan Mulic
 --
 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
 
>>> 
>>> 
>>> 
>>> --
>>> Irfan Mulic
>> --
>> 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
>> 
> 
> 
> 
> --
> Irfan Mulic
 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto
 http://lists.elists.org/cgi-bin/mailman/

Re: [twsocket] Posting unicode data in HTTP Post

2008-11-20 Thread Irfan Mulic
Please advice me how to solve this issue correctly, for UI I don't have
anything except Tnt components in Delphi 7?
What is correct approach to this, I am preaty new with this unicode stuff
but I have to acomplish this task...
Thank you very much.
On Thu, Nov 20, 2008 at 12:46 PM, Irfan Mulic <[EMAIL PROTECTED]> wrote:

>
> Yes it is Tnt Memo. I am using widestring from Tnt, I was thinking that Tnt
> is in utf-8?
>
> Anywhay if I use urlencode on the character from Tnt Memo I am getting '?'
> as result.
>
> What should solve my problems with posting from Tnt Memo using ICS?
> On Thu, Nov 20, 2008 at 12:24 PM, Arno Garrels <[EMAIL PROTECTED]>wrote:
>
>> Irfan Mulic wrote:
>> > So this is ansiChar is not widechar this is all in range of ansi
>> > characters...
>>
>> Why should one display UTF-8 strings in a AnsiString memo?
>> Anyway just to be sure, UTF-8 is a AnsiString (one byte element
>> size of the data array), WideString contains UTF-16 data with two
>> byte element size of the data array.
>> Question: Does memoNote.Text contain UTF-8 or UTF-16?
>> Maybe it's a TNT memo which contains WideStrings?
>>
>> --
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>>
>>
>> >
>> > yes it is ICS issue, do you know is it fixed in newer versions?
>> >
>> > On Thu, Nov 20, 2008 at 11:25 AM, Arno Garrels <[EMAIL PROTECTED]>
>> > wrote:
>> >
>> >> Irfan Mulic wrote:
>> >>> Hi,
>> >>>
>> >>> Here is code:
>> >>>
>> >>>  data :=
>> >>> Format('date=%s&username=%s&password=%s&hash=%s¬e=%s&action=%s',
>> >>>  [UrlEncode(FormatDateTime('mmddhh:nn',now)),
>> >>>  UrlEncode(edtUserName.Text),
>> >>>  UrlEncode(getMd5(edtPassword.Text)),
>> >>>  UrlEncode(getMd5(dataHash)),UrlEncode(memoNote.Text),'i'
>> >>>  ]);
>> >>
>> >> GetMD5() doesn't look like an ICS function since there is no
>> >> overloaded GetMD5() in v5 that takes a string.
>> >>
>> >>>
>> >>> This memoNote.text is utf-8 this doesn't work with unicode
>> >>> characters?
>> >>
>> >> It works as URL encoding should work:
>> >> Characters '0'..'9', 'A'..'Z', 'a'..'z' are left untouched,
>> >> any Char outside these rages are encoded "'%' +
>> >> IntToHex(Ord(AnsiChar))"
>> >>
>> >> It does not look like an ICS issue to me?
>> >>
>> >> --
>> >> Arno Garrels [TeamICS]
>> >> http://www.overbyte.be/eng/overbyte/teamics.html
>> >>
>> >>
>> >>
>> >>> Is it fixed in new versions?
>> >>>
>> >>>  HttpCli1.SendStream := TMemoryStream.Create;
>> >>>  HttpCli1.SendStream.Write(Data[1], Length(Data));
>> >>>  HttpCli1.SendStream.Seek(0, 0);
>> >>>  HttpCli1.RcvdStream := TMemoryStream.Create;
>> >>>  HttpCli1.URL := Trim(ActionURLEdit.Text);
>> >>>  HttpCli1.PostAsync;
>> >>>
>> >>> Thanks.
>> >>>
>> >>> Irfan
>> >>> On Thu, Nov 20, 2008 at 8:59 AM, Arno Garrels <[EMAIL PROTECTED]>
>> >>> wrote:
>> >>>
>>  Irfan Mulic wrote:
>> > I am using V5, first link on download page.
>> 
>>  Ah, ok.
>> 
>> >>> I am having troubles to work with unicode data ?
>> 
>>  What kind of problems do you have exactly? Can you show some code?
>>  With POST you just write data to a stream which is send as is.
>>  There is an example how to post multi-byte form data on the
>>  User-Made page on ICS website.
>> 
>>  --
>>  Arno Garrels [TeamICS]
>>  http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>> 
>> >
>> > On Thu, Nov 20, 2008 at 5:26 AM, Arno Garrels
>> > <[EMAIL PROTECTED]> wrote:
>> >
>> >> Irfan Mulic wrote:
>> >>> Hi,
>> >>>
>> >>> I start using ICS components and I really like them.
>> >>
>> >> Which ICS version are yuo using?
>> >>
>> >> --
>> >> Arno Garrels [TeamICS]
>> >> http://www.overbyte.be/eng/overbyte/teamics.html
>> >>
>> >>>
>> >>> I am having troubles to work with unicode data ?
>> >>>
>> >>> Can I get more info is this supported and can I get some
>> >>> examples of it.
>> >>>
>> >>> I am using example httppost with Delphi 7.
>> >>>
>> >>> Thank you.
>> >>>
>> >>>
>> >>> --
>> >>> Irfan Mulic
>> >> --
>> >> 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
>> >>
>> >
>> >
>> >
>> > --
>> > Irfan Mulic
>>  --
>>  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
>> 
>> >>>
>> >>>
>> >>>
>> >>> --
>> >>> Irfan Mulic
>> >> --
>> >> 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
>> >>
>> >
>> >
>> >
>> > --
>> > Irfan Mulic
>> --
>> To unsubscribe or change your settings for TWSo

Re: [twsocket] Posting unicode data in HTTP Post

2008-11-20 Thread Irfan Mulic
Yes it is Tnt Memo. I am using widestring from Tnt, I was thinking that Tnt
is in utf-8?

Anywhay if I use urlencode on the character from Tnt Memo I am getting '?'
as result.

What should solve my problems with posting from Tnt Memo using ICS?

On Thu, Nov 20, 2008 at 12:24 PM, Arno Garrels <[EMAIL PROTECTED]> wrote:

> Irfan Mulic wrote:
> > So this is ansiChar is not widechar this is all in range of ansi
> > characters...
>
> Why should one display UTF-8 strings in a AnsiString memo?
> Anyway just to be sure, UTF-8 is a AnsiString (one byte element
> size of the data array), WideString contains UTF-16 data with two
> byte element size of the data array.
> Question: Does memoNote.Text contain UTF-8 or UTF-16?
> Maybe it's a TNT memo which contains WideStrings?
>
> --
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
>
>
> >
> > yes it is ICS issue, do you know is it fixed in newer versions?
> >
> > On Thu, Nov 20, 2008 at 11:25 AM, Arno Garrels <[EMAIL PROTECTED]>
> > wrote:
> >
> >> Irfan Mulic wrote:
> >>> Hi,
> >>>
> >>> Here is code:
> >>>
> >>>  data :=
> >>> Format('date=%s&username=%s&password=%s&hash=%s¬e=%s&action=%s',
> >>>  [UrlEncode(FormatDateTime('mmddhh:nn',now)),
> >>>  UrlEncode(edtUserName.Text),
> >>>  UrlEncode(getMd5(edtPassword.Text)),
> >>>  UrlEncode(getMd5(dataHash)),UrlEncode(memoNote.Text),'i'
> >>>  ]);
> >>
> >> GetMD5() doesn't look like an ICS function since there is no
> >> overloaded GetMD5() in v5 that takes a string.
> >>
> >>>
> >>> This memoNote.text is utf-8 this doesn't work with unicode
> >>> characters?
> >>
> >> It works as URL encoding should work:
> >> Characters '0'..'9', 'A'..'Z', 'a'..'z' are left untouched,
> >> any Char outside these rages are encoded "'%' +
> >> IntToHex(Ord(AnsiChar))"
> >>
> >> It does not look like an ICS issue to me?
> >>
> >> --
> >> Arno Garrels [TeamICS]
> >> http://www.overbyte.be/eng/overbyte/teamics.html
> >>
> >>
> >>
> >>> Is it fixed in new versions?
> >>>
> >>>  HttpCli1.SendStream := TMemoryStream.Create;
> >>>  HttpCli1.SendStream.Write(Data[1], Length(Data));
> >>>  HttpCli1.SendStream.Seek(0, 0);
> >>>  HttpCli1.RcvdStream := TMemoryStream.Create;
> >>>  HttpCli1.URL := Trim(ActionURLEdit.Text);
> >>>  HttpCli1.PostAsync;
> >>>
> >>> Thanks.
> >>>
> >>> Irfan
> >>> On Thu, Nov 20, 2008 at 8:59 AM, Arno Garrels <[EMAIL PROTECTED]>
> >>> wrote:
> >>>
>  Irfan Mulic wrote:
> > I am using V5, first link on download page.
> 
>  Ah, ok.
> 
> >>> I am having troubles to work with unicode data ?
> 
>  What kind of problems do you have exactly? Can you show some code?
>  With POST you just write data to a stream which is send as is.
>  There is an example how to post multi-byte form data on the
>  User-Made page on ICS website.
> 
>  --
>  Arno Garrels [TeamICS]
>  http://www.overbyte.be/eng/overbyte/teamics.html
> 
> 
> >
> > On Thu, Nov 20, 2008 at 5:26 AM, Arno Garrels
> > <[EMAIL PROTECTED]> wrote:
> >
> >> Irfan Mulic wrote:
> >>> Hi,
> >>>
> >>> I start using ICS components and I really like them.
> >>
> >> Which ICS version are yuo using?
> >>
> >> --
> >> Arno Garrels [TeamICS]
> >> http://www.overbyte.be/eng/overbyte/teamics.html
> >>
> >>>
> >>> I am having troubles to work with unicode data ?
> >>>
> >>> Can I get more info is this supported and can I get some
> >>> examples of it.
> >>>
> >>> I am using example httppost with Delphi 7.
> >>>
> >>> Thank you.
> >>>
> >>>
> >>> --
> >>> Irfan Mulic
> >> --
> >> 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
> >>
> >
> >
> >
> > --
> > Irfan Mulic
>  --
>  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
> 
> >>>
> >>>
> >>>
> >>> --
> >>> Irfan Mulic
> >> --
> >> 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
> >>
> >
> >
> >
> > --
> > Irfan Mulic
> --
> 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
>



-- 
Irfan Mulic
-- 
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] Posting unicode data in HTTP Post

2008-11-20 Thread Arno Garrels
Irfan Mulic wrote:
> So this is ansiChar is not widechar this is all in range of ansi
> characters...

Why should one display UTF-8 strings in a AnsiString memo?
Anyway just to be sure, UTF-8 is a AnsiString (one byte element 
size of the data array), WideString contains UTF-16 data with two 
byte element size of the data array.
Question: Does memoNote.Text contain UTF-8 or UTF-16?
Maybe it's a TNT memo which contains WideStrings?  

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html


> 
> yes it is ICS issue, do you know is it fixed in newer versions?
> 
> On Thu, Nov 20, 2008 at 11:25 AM, Arno Garrels <[EMAIL PROTECTED]>
> wrote: 
> 
>> Irfan Mulic wrote:
>>> Hi,
>>> 
>>> Here is code:
>>> 
>>>  data :=
>>> Format('date=%s&username=%s&password=%s&hash=%s¬e=%s&action=%s',
>>>  [UrlEncode(FormatDateTime('mmddhh:nn',now)),
>>>  UrlEncode(edtUserName.Text),
>>>  UrlEncode(getMd5(edtPassword.Text)),
>>>  UrlEncode(getMd5(dataHash)),UrlEncode(memoNote.Text),'i'
>>>  ]);
>> 
>> GetMD5() doesn't look like an ICS function since there is no
>> overloaded GetMD5() in v5 that takes a string.
>> 
>>> 
>>> This memoNote.text is utf-8 this doesn't work with unicode
>>> characters?
>> 
>> It works as URL encoding should work:
>> Characters '0'..'9', 'A'..'Z', 'a'..'z' are left untouched,
>> any Char outside these rages are encoded "'%' +
>> IntToHex(Ord(AnsiChar))" 
>> 
>> It does not look like an ICS issue to me?
>> 
>> --
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>> 
>> 
>>> Is it fixed in new versions?
>>> 
>>>  HttpCli1.SendStream := TMemoryStream.Create;
>>>  HttpCli1.SendStream.Write(Data[1], Length(Data));
>>>  HttpCli1.SendStream.Seek(0, 0);
>>>  HttpCli1.RcvdStream := TMemoryStream.Create;
>>>  HttpCli1.URL := Trim(ActionURLEdit.Text);
>>>  HttpCli1.PostAsync;
>>> 
>>> Thanks.
>>> 
>>> Irfan
>>> On Thu, Nov 20, 2008 at 8:59 AM, Arno Garrels <[EMAIL PROTECTED]>
>>> wrote:
>>> 
 Irfan Mulic wrote:
> I am using V5, first link on download page.
 
 Ah, ok.
 
>>> I am having troubles to work with unicode data ?
 
 What kind of problems do you have exactly? Can you show some code?
 With POST you just write data to a stream which is send as is.
 There is an example how to post multi-byte form data on the
 User-Made page on ICS website.
 
 --
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 
 
> 
> On Thu, Nov 20, 2008 at 5:26 AM, Arno Garrels
> <[EMAIL PROTECTED]> wrote:
> 
>> Irfan Mulic wrote:
>>> Hi,
>>> 
>>> I start using ICS components and I really like them.
>> 
>> Which ICS version are yuo using?
>> 
>> --
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>>> 
>>> I am having troubles to work with unicode data ?
>>> 
>>> Can I get more info is this supported and can I get some
>>> examples of it.
>>> 
>>> I am using example httppost with Delphi 7.
>>> 
>>> Thank you.
>>> 
>>> 
>>> --
>>> Irfan Mulic
>> --
>> 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
>> 
> 
> 
> 
> --
> Irfan Mulic
 --
 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 
 
>>> 
>>> 
>>> 
>>> --
>>> Irfan Mulic
>> --
>> 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
>> 
> 
> 
> 
> --
> Irfan Mulic
-- 
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] Posting unicode data in HTTP Post

2008-11-20 Thread Irfan Mulic
So this is ansiChar is not widechar this is all in range of ansi
characters...

yes it is ICS issue, do you know is it fixed in newer versions?

On Thu, Nov 20, 2008 at 11:25 AM, Arno Garrels <[EMAIL PROTECTED]> wrote:

> Irfan Mulic wrote:
> > Hi,
> >
> > Here is code:
> >
> >  data :=
> > Format('date=%s&username=%s&password=%s&hash=%s¬e=%s&action=%s',
> >  [UrlEncode(FormatDateTime('mmddhh:nn',now)),
> >  UrlEncode(edtUserName.Text),
> >  UrlEncode(getMd5(edtPassword.Text)),
> >  UrlEncode(getMd5(dataHash)),UrlEncode(memoNote.Text),'i'
> >  ]);
>
> GetMD5() doesn't look like an ICS function since there is no overloaded
> GetMD5() in v5 that takes a string.
>
> >
> > This memoNote.text is utf-8 this doesn't work with unicode
> > characters?
>
> It works as URL encoding should work:
> Characters '0'..'9', 'A'..'Z', 'a'..'z' are left untouched,
> any Char outside these rages are encoded "'%' + IntToHex(Ord(AnsiChar))"
>
> It does not look like an ICS issue to me?
>
> --
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
>
>
>
> > Is it fixed in new versions?
> >
> >  HttpCli1.SendStream := TMemoryStream.Create;
> >  HttpCli1.SendStream.Write(Data[1], Length(Data));
> >  HttpCli1.SendStream.Seek(0, 0);
> >  HttpCli1.RcvdStream := TMemoryStream.Create;
> >  HttpCli1.URL := Trim(ActionURLEdit.Text);
> >  HttpCli1.PostAsync;
> >
> > Thanks.
> >
> > Irfan
> > On Thu, Nov 20, 2008 at 8:59 AM, Arno Garrels <[EMAIL PROTECTED]>
> > wrote:
> >
> >> Irfan Mulic wrote:
> >>> I am using V5, first link on download page.
> >>
> >> Ah, ok.
> >>
> > I am having troubles to work with unicode data ?
> >>
> >> What kind of problems do you have exactly? Can you show some code?
> >> With POST you just write data to a stream which is send as is.
> >> There is an example how to post multi-byte form data on the
> >> User-Made page on ICS website.
> >>
> >> --
> >> Arno Garrels [TeamICS]
> >> http://www.overbyte.be/eng/overbyte/teamics.html
> >>
> >>
> >>>
> >>> On Thu, Nov 20, 2008 at 5:26 AM, Arno Garrels <[EMAIL PROTECTED]>
> >>> wrote:
> >>>
>  Irfan Mulic wrote:
> > Hi,
> >
> > I start using ICS components and I really like them.
> 
>  Which ICS version are yuo using?
> 
>  --
>  Arno Garrels [TeamICS]
>  http://www.overbyte.be/eng/overbyte/teamics.html
> 
> >
> > I am having troubles to work with unicode data ?
> >
> > Can I get more info is this supported and can I get some examples
> > of it.
> >
> > I am using example httppost with Delphi 7.
> >
> > Thank you.
> >
> >
> > --
> > Irfan Mulic
>  --
>  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
> 
> >>>
> >>>
> >>>
> >>> --
> >>> Irfan Mulic
> >> --
> >> 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
> >>
> >
> >
> >
> > --
> > Irfan Mulic
> --
> 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
>



-- 
Irfan Mulic
-- 
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] Posting unicode data in HTTP Post

2008-11-20 Thread Arno Garrels
Irfan Mulic wrote:
> Hi,
> 
> Here is code:
> 
>  data :=
> Format('date=%s&username=%s&password=%s&hash=%s¬e=%s&action=%s',
>  [UrlEncode(FormatDateTime('mmddhh:nn',now)),
>  UrlEncode(edtUserName.Text),
>  UrlEncode(getMd5(edtPassword.Text)),
>  UrlEncode(getMd5(dataHash)),UrlEncode(memoNote.Text),'i'
>  ]);

GetMD5() doesn't look like an ICS function since there is no overloaded
GetMD5() in v5 that takes a string.

> 
> This memoNote.text is utf-8 this doesn't work with unicode
> characters? 

It works as URL encoding should work:
Characters '0'..'9', 'A'..'Z', 'a'..'z' are left untouched,
any Char outside these rages are encoded "'%' + IntToHex(Ord(AnsiChar))"

It does not look like an ICS issue to me?

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

  

> Is it fixed in new versions?
> 
>  HttpCli1.SendStream := TMemoryStream.Create;
>  HttpCli1.SendStream.Write(Data[1], Length(Data));
>  HttpCli1.SendStream.Seek(0, 0);
>  HttpCli1.RcvdStream := TMemoryStream.Create;
>  HttpCli1.URL := Trim(ActionURLEdit.Text);
>  HttpCli1.PostAsync;
> 
> Thanks.
> 
> Irfan
> On Thu, Nov 20, 2008 at 8:59 AM, Arno Garrels <[EMAIL PROTECTED]>
> wrote: 
> 
>> Irfan Mulic wrote:
>>> I am using V5, first link on download page.
>> 
>> Ah, ok.
>> 
> I am having troubles to work with unicode data ?
>> 
>> What kind of problems do you have exactly? Can you show some code?
>> With POST you just write data to a stream which is send as is.
>> There is an example how to post multi-byte form data on the
>> User-Made page on ICS website.
>> 
>> --
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>> 
>>> 
>>> On Thu, Nov 20, 2008 at 5:26 AM, Arno Garrels <[EMAIL PROTECTED]>
>>> wrote:
>>> 
 Irfan Mulic wrote:
> Hi,
> 
> I start using ICS components and I really like them.
 
 Which ICS version are yuo using?
 
 --
 Arno Garrels [TeamICS]
 http://www.overbyte.be/eng/overbyte/teamics.html
 
> 
> I am having troubles to work with unicode data ?
> 
> Can I get more info is this supported and can I get some examples
> of it.
> 
> I am using example httppost with Delphi 7.
> 
> Thank you.
> 
> 
> --
> Irfan Mulic
 --
 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 
 
>>> 
>>> 
>>> 
>>> --
>>> Irfan Mulic
>> --
>> 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
>> 
> 
> 
> 
> --
> Irfan Mulic
-- 
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] Posting unicode data in HTTP Post

2008-11-20 Thread Irfan Mulic
Hi,

Here is code:

  data :=
Format('date=%s&username=%s&password=%s&hash=%s¬e=%s&action=%s',
  [UrlEncode(FormatDateTime('mmddhh:nn',now)),
  UrlEncode(edtUserName.Text),
  UrlEncode(getMd5(edtPassword.Text)),
  UrlEncode(getMd5(dataHash)),UrlEncode(memoNote.Text),'i'
  ]);

This memoNote.text is utf-8 this doesn't work with unicode characters? Is it
fixed in new versions?

  HttpCli1.SendStream := TMemoryStream.Create;
  HttpCli1.SendStream.Write(Data[1], Length(Data));
  HttpCli1.SendStream.Seek(0, 0);
  HttpCli1.RcvdStream := TMemoryStream.Create;
  HttpCli1.URL := Trim(ActionURLEdit.Text);
  HttpCli1.PostAsync;

Thanks.

Irfan
On Thu, Nov 20, 2008 at 8:59 AM, Arno Garrels <[EMAIL PROTECTED]> wrote:

> Irfan Mulic wrote:
> > I am using V5, first link on download page.
>
> Ah, ok.
>
> >>> I am having troubles to work with unicode data ?
>
> What kind of problems do you have exactly? Can you show some code?
> With POST you just write data to a stream which is send as is.
> There is an example how to post multi-byte form data on the
> User-Made page on ICS website.
>
> --
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
>
>
> >
> > On Thu, Nov 20, 2008 at 5:26 AM, Arno Garrels <[EMAIL PROTECTED]>
> > wrote:
> >
> >> Irfan Mulic wrote:
> >>> Hi,
> >>>
> >>> I start using ICS components and I really like them.
> >>
> >> Which ICS version are yuo using?
> >>
> >> --
> >> Arno Garrels [TeamICS]
> >> http://www.overbyte.be/eng/overbyte/teamics.html
> >>
> >>>
> >>> I am having troubles to work with unicode data ?
> >>>
> >>> Can I get more info is this supported and can I get some examples of
> >>> it.
> >>>
> >>> I am using example httppost with Delphi 7.
> >>>
> >>> Thank you.
> >>>
> >>>
> >>> --
> >>> Irfan Mulic
> >> --
> >> 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
> >>
> >
> >
> >
> > --
> > Irfan Mulic
> --
> 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
>



-- 
Irfan Mulic
-- 
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] Posting unicode data in HTTP Post

2008-11-20 Thread Arno Garrels
Irfan Mulic wrote:
> I am using V5, first link on download page.

Ah, ok. 

>>> I am having troubles to work with unicode data ?

What kind of problems do you have exactly? Can you show some code?
With POST you just write data to a stream which is send as is. 
There is an example how to post multi-byte form data on the 
User-Made page on ICS website. 

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html


> 
> On Thu, Nov 20, 2008 at 5:26 AM, Arno Garrels <[EMAIL PROTECTED]>
> wrote: 
> 
>> Irfan Mulic wrote:
>>> Hi,
>>> 
>>> I start using ICS components and I really like them.
>> 
>> Which ICS version are yuo using?
>> 
>> --
>> Arno Garrels [TeamICS]
>> http://www.overbyte.be/eng/overbyte/teamics.html
>> 
>>> 
>>> I am having troubles to work with unicode data ?
>>> 
>>> Can I get more info is this supported and can I get some examples of
>>> it.
>>> 
>>> I am using example httppost with Delphi 7.
>>> 
>>> Thank you.
>>> 
>>> 
>>> --
>>> Irfan Mulic
>> --
>> 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
>> 
> 
> 
> 
> --
> Irfan Mulic
-- 
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] Posting unicode data in HTTP Post

2008-11-20 Thread Irfan Mulic
I am using V5, first link on download page.

On Thu, Nov 20, 2008 at 5:26 AM, Arno Garrels <[EMAIL PROTECTED]> wrote:

> Irfan Mulic wrote:
> > Hi,
> >
> > I start using ICS components and I really like them.
>
> Which ICS version are yuo using?
>
> --
> Arno Garrels [TeamICS]
> http://www.overbyte.be/eng/overbyte/teamics.html
>
> >
> > I am having troubles to work with unicode data ?
> >
> > Can I get more info is this supported and can I get some examples of
> > it.
> >
> > I am using example httppost with Delphi 7.
> >
> > Thank you.
> >
> >
> > --
> > Irfan Mulic
> --
> 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
>



-- 
Irfan Mulic
-- 
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] Posting unicode data in HTTP Post

2008-11-20 Thread Arno Garrels
Irfan Mulic wrote:
> Hi,
> 
> I start using ICS components and I really like them.

Which ICS version are yuo using?

--
Arno Garrels [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html

> 
> I am having troubles to work with unicode data ?
> 
> Can I get more info is this supported and can I get some examples of
> it. 
> 
> I am using example httppost with Delphi 7.
> 
> Thank you.
> 
> 
> --
> Irfan Mulic
-- 
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