Re: [twsocket] HttpCli UTF-8 Coding Issue
FireFox knows because it says so in the HTML itself: http://www.expansys.fr/ http://www.expansys.cn/ In addition the http headers indicate (for the Chinese one above): Connection: close Date: Thu, 20 Jul 2006 23:52:55 GMT Server: Microsoft-IIS/6.0 Content-Type: text/html; Charset=utf-8 Cache-Control: private you can see the headers with THttpCli On Thu, 20 Jul 2006 16:53:33 -0300, you wrote: > Hi, > > Then how come Mozilla Firefox doesn´t have this weird char problem? I > just used a TMemoryStream instead of using my old TStringStream, debugged > the contents of the Buffer and it is as buggy as it was. > How come the server is sending me something and the browser something > else? :'( Because I trully don't believe that Mozilla Firefox is parsing > that kind of data. It even doesn't respect the same amount of bytes per char > ...). I don't get it.. Me stupid!!! 8/ > > Thank you for your time, > > Marcelo Grossi > > - Original Message - > From: "Francois PIETTE" <[EMAIL PROTECTED]> > To: "ICS support mailing" > Sent: Thursday, July 20, 2006 4:24 PM > Subject: Re: [twsocket] HttpCli UTF-8 Coding Issue > > > >>How do I get the chance of interpreting the characters with HttpCli? I > >> don't set any property whatsoever regarding the enconding of the data I'm > >> receiving. The TStringStream the data comes is already the way I showed > >> in > >> my last message ... How do I get the "raw" data or something? > > > > With HTTP component, you always get the data exactly as the server sent > > it. > > HTTP component does do any processing on the data itself. It is stored as > > is > > in the stream you provide for storage. > > > > Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html > > -- > > [EMAIL PROTECTED] > > http://www.overbyte.be > > > > > > -- > > To unsubscribe or change your settings for TWSocket mailing list > > please goto http://www.elists.org/mailman/listinfo/twsocket > > Visit our website at http://www.overbyte.be > > -- Rob Chafer Silverfrost -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli UTF-8 Coding Issue
Scrive Marcelo Grossi <[EMAIL PROTECTED]>: > Hi, > > Then how come Mozilla Firefox doesn´t have this weird char problem? What you have in the stream is the body that the server sent to you. Most probably in the header there are useful information to know how interpreted the body. Do you receive html or what? Bye, Maurizio. This mail has been sent using Alpikom webmail system http://www.alpikom.it -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli UTF-8 Coding Issue
Hi, Then how come Mozilla Firefox doesn´t have this weird char problem? I just used a TMemoryStream instead of using my old TStringStream, debugged the contents of the Buffer and it is as buggy as it was. How come the server is sending me something and the browser something else? :'( Because I trully don't believe that Mozilla Firefox is parsing that kind of data. It even doesn't respect the same amount of bytes per char ...). I don't get it.. Me stupid!!! 8/ Thank you for your time, Marcelo Grossi - Original Message - From: "Francois PIETTE" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Thursday, July 20, 2006 4:24 PM Subject: Re: [twsocket] HttpCli UTF-8 Coding Issue >>How do I get the chance of interpreting the characters with HttpCli? I >> don't set any property whatsoever regarding the enconding of the data I'm >> receiving. The TStringStream the data comes is already the way I showed >> in >> my last message ... How do I get the "raw" data or something? > > With HTTP component, you always get the data exactly as the server sent > it. > HTTP component does do any processing on the data itself. It is stored as > is > in the stream you provide for storage. > > Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html > -- > [EMAIL PROTECTED] > http://www.overbyte.be > > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli UTF-8 Coding Issue
>How do I get the chance of interpreting the characters with HttpCli? I > don't set any property whatsoever regarding the enconding of the data I'm > receiving. The TStringStream the data comes is already the way I showed in > my last message ... How do I get the "raw" data or something? With HTTP component, you always get the data exactly as the server sent it. HTTP component does do any processing on the data itself. It is stored as is in the stream you provide for storage. Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli UTF-8 Coding Issue
Hi Robert, How do I get the chance of interpreting the characters with HttpCli? I don't set any property whatsoever regarding the enconding of the data I'm receiving. The TStringStream the data comes is already the way I showed in my last message ... How do I get the "raw" data or something? Cheers, Marcelo Grossi - Original Message - From: "Robert Chafer" <[EMAIL PROTECTED]> To: "ICS support mailing" Sent: Thursday, July 20, 2006 2:30 PM Subject: Re: [twsocket] HttpCli UTF-8 Coding Issue It depends on how you interpret the characters you are downloading. Look at this page: http://www.expansys.fr/ Now change the encoding from ISO8859-1 to UTF-8 (in IE its right click the page and choose encoding, FF View->Character Encoding). You see how (in IE) the accented characters turn into Chinese? This is because the way you process the characters depends on the encoding used to send them. On Thu, 20 Jul 2006 14:23:06 -0300, you wrote: > Hello, > > I´ve posted a message a few days ago about a html page being > retrieved > with weird chars (through ICS's HttpCli). As very well suggested by JP in > his reply to my message, the page was endeed UTF-8 coded. But the > question > remains (as I am currently building a weird char converter as they appear > on > the captured page ... [yes, very dumb on my behalf]), how can I get the > retrieved characters as UTF-8? I mean, UTF-8 uses more then 1 Byte per > char > and on the TStringStream I'm using to retrieve the data from the HttpCli > I > get mixed type chars. > All the letters (a..z, A..Z, 0..9 and some other chars) are being > retrived as 1 ASCII Byte except for some weird chars that are coming in > some > other format using more than 1 Byte (by more than 1 Byte I don't mean 2 > Bytes, I mean 2 or 3 Bytes depending on the case). Bellow I send you some > example strings taken directly from my application: > > What I get: > a história do municÃpio de .. estrela do agronegócio â?oprêmio é > acima de tudo o reconhecimento do jornalismo, com foco no cidadão, que > estamos fazendo. Ã? o resultado de um trabalho feito dentro de uma > empresa > pública de comunicaçãoâ?o > > What I was supposed to get: > a história do município de .. estrela do agronegócio "prêmio é acima > de > tudo o reconhecimento do jornalismo, com foco no cidadão, que estamos > fazendo. É o resultado de um trabalho feito dentro de uma empresa pública > de > comunicação" > > Note: The weird chars can come in 2 or 3 Bytes. The char " comes as 3 > Bytes (â?o). On the other hand the char É comes in 2 Bytes (Ã?). > Note2.: The texts are in Brazilian Portuguese. > > The question is: Is the problem on the TStringStream that for some > reason is returning some ASCII chars and some others UTF-8 chars? Or the > problem is that I missed some property of THttpCli making the retrieved > page > look so strange? Or the problem lies somewhere else far beyond my little > knowledge? > > Please help! :'( > > Best regards, > > Marcelo Grossi -- Rob Chafer Silverfrost -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli UTF-8 Coding Issue
> UTF-8 uses more then 1 Byte per char and on the TStringStream I'm > using to retrieve the data from the HttpCli I get mixed type chars. The component returns a binary stream, it may be a zip file or text in various character sets, with one or two bytes per character. Delphi supports the 2 bytes per character widestring data type, aka Unicode, you need to read some help on converting strings to widestring. The Jedi library includes UTF-8 to Widestring conversion. Angus -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] HttpCli UTF-8 Coding Issue
It depends on how you interpret the characters you are downloading. Look at this page: http://www.expansys.fr/ Now change the encoding from ISO8859-1 to UTF-8 (in IE its right click the page and choose encoding, FF View->Character Encoding). You see how (in IE) the accented characters turn into Chinese? This is because the way you process the characters depends on the encoding used to send them. On Thu, 20 Jul 2006 14:23:06 -0300, you wrote: > Hello, > > I´ve posted a message a few days ago about a html page being retrieved > with weird chars (through ICS's HttpCli). As very well suggested by JP in > his reply to my message, the page was endeed UTF-8 coded. But the question > remains (as I am currently building a weird char converter as they appear on > the captured page ... [yes, very dumb on my behalf]), how can I get the > retrieved characters as UTF-8? I mean, UTF-8 uses more then 1 Byte per char > and on the TStringStream I'm using to retrieve the data from the HttpCli I > get mixed type chars. > All the letters (a..z, A..Z, 0..9 and some other chars) are being > retrived as 1 ASCII Byte except for some weird chars that are coming in some > other format using more than 1 Byte (by more than 1 Byte I don't mean 2 > Bytes, I mean 2 or 3 Bytes depending on the case). Bellow I send you some > example strings taken directly from my application: > > What I get: > a história do municÃpio de .. estrela do agronegócio â?oprêmio é > acima de tudo o reconhecimento do jornalismo, com foco no cidadão, que > estamos fazendo. Ã? o resultado de um trabalho feito dentro de uma empresa > pública de comunicaçãoâ?o > > What I was supposed to get: > a história do município de .. estrela do agronegócio "prêmio é acima de > tudo o reconhecimento do jornalismo, com foco no cidadão, que estamos > fazendo. É o resultado de um trabalho feito dentro de uma empresa pública de > comunicação" > > Note: The weird chars can come in 2 or 3 Bytes. The char " comes as 3 > Bytes (â?o). On the other hand the char É comes in 2 Bytes (Ã?). > Note2.: The texts are in Brazilian Portuguese. > > The question is: Is the problem on the TStringStream that for some > reason is returning some ASCII chars and some others UTF-8 chars? Or the > problem is that I missed some property of THttpCli making the retrieved page > look so strange? Or the problem lies somewhere else far beyond my little > knowledge? > > Please help! :'( > > Best regards, > > Marcelo Grossi -- Rob Chafer Silverfrost -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] HttpCli UTF-8 Coding Issue
Hello, I´ve posted a message a few days ago about a html page being retrieved with weird chars (through ICS's HttpCli). As very well suggested by JP in his reply to my message, the page was endeed UTF-8 coded. But the question remains (as I am currently building a weird char converter as they appear on the captured page ... [yes, very dumb on my behalf]), how can I get the retrieved characters as UTF-8? I mean, UTF-8 uses more then 1 Byte per char and on the TStringStream I'm using to retrieve the data from the HttpCli I get mixed type chars. All the letters (a..z, A..Z, 0..9 and some other chars) are being retrived as 1 ASCII Byte except for some weird chars that are coming in some other format using more than 1 Byte (by more than 1 Byte I don't mean 2 Bytes, I mean 2 or 3 Bytes depending on the case). Bellow I send you some example strings taken directly from my application: What I get: a história do municÃpio de .. estrela do agronegócio â?oprêmio é acima de tudo o reconhecimento do jornalismo, com foco no cidadão, que estamos fazendo. Ã? o resultado de um trabalho feito dentro de uma empresa pública de comunicaçãoâ?o What I was supposed to get: a história do município de .. estrela do agronegócio "prêmio é acima de tudo o reconhecimento do jornalismo, com foco no cidadão, que estamos fazendo. É o resultado de um trabalho feito dentro de uma empresa pública de comunicação" Note: The weird chars can come in 2 or 3 Bytes. The char " comes as 3 Bytes (â?o). On the other hand the char É comes in 2 Bytes (Ã?). Note2.: The texts are in Brazilian Portuguese. The question is: Is the problem on the TStringStream that for some reason is returning some ASCII chars and some others UTF-8 chars? Or the problem is that I missed some property of THttpCli making the retrieved page look so strange? Or the problem lies somewhere else far beyond my little knowledge? Please help! :'( Best regards, Marcelo Grossi -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] ICS v6 enhanced tcp server challenge
Hello, I found some time to work on a new multi-threading TCP server component. It features multiple listen sockets implemented as TCollectionItems and dynamic connection pooling. Threads as well as client objects are dynamically managed. Tested as a simple echo server it appears to be very fast. Though it is still work in progress the inluded demo runs stable, tested with several million test connections. The demo also runs listen sockets in a worker thread, and lets you set CPU binding (affinity masks) of the various threads. I appreciate if interested ICS users would help to improve, test or just play with it, anyway it is a nice toy ;-) Your comments are welcome. The ZIP also includes a test client which is a quick and dirty modification of Wilfried's GPRS Client. http://www.duodata.de/misc/delphi/MTServer_Bin.zip (~ 500 KB) http://www.duodata.de/misc/delphi/MTServer_Src.zip (~ 50 KB) Requires latest ICS-V6, Delphi7 or Delphi10. Also the included, slightly modified OverbyteIcsWndControl.pas (Property ThreadID published, search for "{AG}") which Francois has not confirmed yet. --- Arno Garrels [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] MSN IM protocol implementation with ICS
> We need the specs of MSN protocol in order to understand, design and > implement a client for it. Is there any ready code (Delphi/C++) and > documentation (web site, PDF) for that specific protocol? Also, is this > information public or reverse engineered? IOW, can one get the latest > Windows Messenger Live specs from MS? Google is your friend ! Enter "MSN protocol" and you'll find what you are looking for. -- Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] Fw: Bug dans OverbyteIcsSmtpProt v6
> Dans la derniere version beta que je viens tout juste de prendre sur votre > site, il y a une perde de mémoire dans la fonction "PrepareEmail" du > fichier > "OverbyteIcsSmtpProt.pas", situé a la ligne 3376: > > if FMailMessage.GetText^ <> #0 then > > Cette fonction alloue de la mémoire et celle-ci doit être libérée avec > StrDispose(), ce qui n'est pas fait dans la fonction. > > Facile à corriger, j'ai remplacé la ligne par: > > if FMailMessage.Text <> '' then > > et FastMM 4.68 ne rapporte plus aucune perte de mémoire. Je vois dans la > source que la ligne fautive en remplace une autre... Peut-être aurez-vous > une meilleure solution que la mienne? > > Merci pour ICS! -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
[twsocket] MSN IM protocol implementation with ICS
Hello, We need the specs of MSN protocol in order to understand, design and implement a client for it. Is there any ready code (Delphi/C++) and documentation (web site, PDF) for that specific protocol? Also, is this information public or reverse engineered? IOW, can one get the latest Windows Messenger Live specs from MS? Best Regards, SZ -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Multiple clients - no server
Hello Eric, Yes you can do the same way. --- Rgds, Wilfried [TeamICS] http://www.overbyte.be/eng/overbyte/teamics.html http://www.mestdagh.biz Wednesday, July 19, 2006, 21:24, Eric Verstrepen wrote: > Hi All, > I have the following situation. > On one computer I have to connect to max. 50 servers. > Every server is connected to a client on the computer. > Al servers (computers ) and the one with the clients or on a LAN. > So I need 50 clients on that computer. > The data traffic is very low. > So what I want to do is the following. > I want to make a list with the properties of the servers.( IPadres,port ) > For every server I create at runtime a client. > All clients using the same eventhandlers. > I made something in the past for serial comm..(RS232) > What I was doing is the following: > I use on event for receiving data. > When the data is received, > I use postmessage to trigger my other routine where I handle the data. > In this way, the event handler for receiving data gets free to serve the > other connections. > Can I use the same way of working when i use Twsocket ? > Or what I have to do to make sure I can serve all my connections. > Best regards, > Eric Verstrepen > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.10.1/391 - Release Date: 18/07/2006 -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be
Re: [twsocket] Multiple clients - no server
Yes you can. Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html -- [EMAIL PROTECTED] Author of ICS (Internet Component Suite, freeware) Author of MidWare (Multi-tier framework, freeware) http://www.overbyte.be - Original Message - From: "Eric Verstrepen" <[EMAIL PROTECTED]> To: Sent: Wednesday, July 19, 2006 9:24 PM Subject: [twsocket] Multiple clients - no server > Hi All, > > > > I have the following situation. > > On one computer I have to connect to max. 50 servers. > > Every server is connected to a client on the computer. > > Al servers (computers ) and the one with the clients or on a LAN. > > So I need 50 clients on that computer. > > The data traffic is very low. > > > > So what I want to do is the following. > > > > I want to make a list with the properties of the servers.( IPadres,port ) > > For every server I create at runtime a client. > > All clients using the same eventhandlers. > > > > I made something in the past for serial comm..(RS232) > > What I was doing is the following: > > > > I use on event for receiving data. > > When the data is received, > > I use postmessage to trigger my other routine where I handle the data. > > In this way, the event handler for receiving data gets free to serve the > other connections. > > > > Can I use the same way of working when i use Twsocket ? > > Or what I have to do to make sure I can serve all my connections. > > > > Best regards, > > Eric Verstrepen > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.1.394 / Virus Database: 268.10.1/391 - Release Date: 18/07/2006 > > -- > To unsubscribe or change your settings for TWSocket mailing list > please goto http://www.elists.org/mailman/listinfo/twsocket > Visit our website at http://www.overbyte.be -- To unsubscribe or change your settings for TWSocket mailing list please goto http://www.elists.org/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be