[twsocket] Error after sending email from ide

2012-06-19 Thread Xavier Mor-Mur

Hi to all

I need help to solve error when running programs from ide and using ics.

When testing programs from ide if program send any e-mail when close I 
get next error


---
bds.exe - bordbk120N.dll
---
Assertion failure: (!SetThreadContext failed)
in ..\win32src\thread32.cpp at line 434
Continue execution?
---
Yes   No
---

Answer yes or no left ide unstable and need to close it getting next error

[Window Title]
CodeGear RAD Studio for Windows
[Main Instruction]
CodeGear RAD Studio for Windows dejó de funcionar (CodeGear RAD Studio 
for Windows stopped working)

[Content]
Windows está buscando una solución al problema... (Windows is searching 
for a solution ...)

[Cancelar] (Cancel)

I updated to last version from trunk with same result.

Note: I applied next change to OverbyteIcsSmtpProt.pas suggested to me 
by Arno many time ago

{$IFDEF USE_SSL}
THtmlSmtpCli = class(TSslSmtpCli)
{$ELSE}
THtmlSmtpCli = class(TSmtpCli)
{$ENDIF}

If I run program out from ide there isn't any error.

My computer is new and have w7-64bit, rad2009, c personality.
My old was vista-32bit and never show this type of error.

Has any one get this type of error?
can you help me?

Thanks for all for any typ.

Xavi

 * English - detected
 * English
 * Catalan

 * English
 * Catalan

javascript:void(0);
--
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] Questions on HtmlSmtpClient and SslSmtpClient

2011-05-15 Thread Xavier Mor-Mur

Thanks for all answers. All have helped a lot.
I think missing properties HtmlText, PlainText and EmailImages where 
required to construct mail.

I think now I know wich is the best way to migrate to ssl.

Thanks again
Xavi

Al 15/05/2011 07:00, En/na Francois PIETTE ha escrit:

Currently I'm using HtmlSmtpClient and planing update to SslSmtClient.
and get next questions to migrate current code to ssl.
1- with html client can be sent mail at once in html with embedded 
images and plain text. this can be done with ssl client?
2- if with ssl client only can be send as html or text and I send 
mail as html, what happen  if destination client only support plain 
text, who gets it can read the mail?


Using SSL for SMTP client doesn't change anything about what the mail 
is or can contain. SSL is used at the lowest level for transporting 
data. Whatever transport is, a SMTP mail is always the same format: a 
single text document. Even when sent as HTML with embedded images and 
independently of SSL, an email is always a simple text file. Simply, 
the text file is either plain text or text formatted a certain way 
named MIME to embed HTML and images. You should consider the SMTP 
client is organized with layers: a transport layer (itself divided in 
one or two layer according to the presence or not of SSL), a message 
layer (simple text lines forming a header and a body) and a multipart 
content (plain text, html and images). Each mayer make use of the 
layer below it.


Does it helps ?

--
francois.pie...@overbyte.be
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


-
Se certifico que el correo no contiene virus.
Comprobada por AVG - www.avg.es
Version: 10.0.1375 / Base de datos de virus: 1500/3637 - Fecha de la 
version: 14/05/2011





--
Xavier Mor-Mur

--
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] Questions on HtmlSmtpClient and SslSmtpClient

2011-05-14 Thread Xavier Mor-Mur

Currently I'm using HtmlSmtpClient and planing update to SslSmtClient.

After a look on SsslSmtpClient properties:

html client : HtmlText, PlainText, MailMessage, EmailFiles and EmailImages
ssl client : MailMessage and EmailFiles

and get next questions to migrate current code to ssl.
1- with html client can be sent mail at once in html with embedded 
images and plain text. this can be done with ssl client?
2- if with ssl client only can be send as html or text and I send mail 
as html, what happen  if destination client only support plain text, who 
gets it can read the mail?


Thanks in advance

--
Xavier Mor-Mur

--
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] Season's greetings

2010-12-24 Thread Xavier Mor-Mur
Thanks Francois and my best greetings and wishes to all people around 
the world.

Bon Nadal i joiós 2011
Feliz Navidad y venturoso 2011

Xavi


Al 23/12/2010 21:49, En/na Francois PIETTE ha escrit:

Hi Everyone !

Happy Holidays and best wishes for 2011 !

Merry Christmas,
--
francois.pie...@overbyte.be
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


-
No se encontraron virus en este mensaje.
Comprobado por AVG - www.avg.com
Version: 10.0.1170 / Base de datos de virus: 426/ - Fecha de 
publicacion: 12/23/10





--
Xavier Mor-Mur

--
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] help on httpcli post

2010-10-12 Thread Xavier Mor-Mur

 Hello Francois

As I know HFS have a some kind of code but I don't know how to call it 
from client.
Open on your navigator http://81.184.21.22:100/hfs/; and will see a 
very easy web page with list of files with two buttons UPLOAD and 
LOGIN. Upload button allow select up to 10 files and then upload it 
using UPLOAD FILES button.
HFS is one exe and one config file, don't need install and all work is 
done internally.


I tried some demos using http post and only found one which works.
Demo which works is submitfile from 
http://www.clevercomponents.com/products/inetsuite/demos/submitfile.asp
I don't know it does but it works, but other http demos from same site 
using post don't work.


Any idea is welcome, in the mean time will try with options of HFS.

Regards
Xavi

Al 12/10/2010 09:48, En/na Francois PIETTE ha escrit:
I try to include http get and post to my program and doing tests on 
OverbyteIcshttptst demo.

I get function GET work but not with function POST.

I configured at home free HFS - HTTP File Server from 
http://www.rejetto.com/hfs/

When running demo I set
URL = http://81.184.21.22:100/hfs/c-obfuscado.txt
Data = C:\Mis documentos\c-obfuscado.txt
Button GET works and how text file in panel
Button POST give sequence events bellow.
POST Failed !
StatusCode   = 404
ReasonPhrase = Request aborted on timeout

Sure I missing to do something but I don't know what.


You cannot do a post to a document link unless there is a script (or 
whatever code is required) at server side to handle the post.


I suggest you first try posting using your favorite internet navigator 
to validate the webserver configuration, then you may start doing the 
same with the component.


Usually, the webserver has an HTML form with some fields (including 
file field) and a submit button. behing the submit button, you have 
the URL used to post the form. This is the URL you have to use with 
the component.


--
francois.pie...@overbyte.be
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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.862 / Base de datos de virus: 271.1.1/3192 - Fecha de la version: 
10/12/10 08:34:00



--
Xavier Mor-Mur

--
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] help on httpcli post

2010-10-12 Thread Xavier Mor-Mur

 Thanks Francois and Frans
I will take look.
May need is the most basic use of http get/post.
Sporadically and need send files to servers for which I don't have any 
support/control.
Some of them have ftp support, no problem with ICS, but troubles I come 
with http protocol.

I'm a permanent beginner programmer.
Many thanks for all
Xavi

Al 12/10/2010 14:44, En/na Francois PIETTE ha escrit:

As I know HFS have a some kind of code but I don't know how to call it
from client.
Open on your navigator http:// 81.184.21.22 :100/hfs/ and will see 
a very

easy web page with list of files with two buttons UPLOAD and LOGIN.
Upload button allow select up to 10 files and then upload it using 
UPLOAD

FILES button.
HFS is one exe and one config file, don't need install and all work is
done internally.


The browser will interpret the JavaScript which is behind the form and
post/get the files to the website.
I suggest you use WireShark to see what URL your browser use to post the
files. It is usually much easier to see what the browser do than 
trying to
understand complex JavaScript which is probably written so that you 
cannot

easily reverse engineer it.


Any idea is welcome, in the mean time will try with options of HFS.


I don't know your requirements, but why don't you write your own server
program using ICS component ? You have everything you need there.

--
francois.pie...@overbyte.be
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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.862 / Base de datos de virus: 271.1.1/3192 - Fecha de la version: 
10/12/10 08:34:00



--
Xavier Mor-Mur

--
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] help on httpcli post

2010-10-12 Thread Xavier Mor-Mur

 Hi RTT

Thanks for sample. I play with it in few minutes.

I read many off post even when are out of my programing knowledge, give 
me ideas how to do better my programs.

Thanks again to all ICS folks.

Xavi

Al 12/10/2010 18:55, En/na RTT ha escrit:


Here is a sample that work.

Get the 'multipart/form-data' encode tstream class code from this unit:
http://read.pudn.com/downloads116/sourcecode/internet/495621/Gz235_200671623235689/cn700_del549790557/IndyMultipartFormData/MsMultiPartFormData.pas__.htm 



Start a new Delphi application, and in the main form place:

1 THttpCli,
1 TButton,
1 TMemo
1 TOpenDialog

   function GetMimeType(fileName: string): string;
   var reg: tregistry;
  ext: string;
   begin
  result := 'application/unknown';
  ext := lowercase(extractFileExt(filename));
  reg := tregistry.Create;
  try
reg.RootKey := HKEY_CLASSES_ROOT;
if reg.OpenKey(ext, false) and reg.ValueExists('Content Type') 
then

  result := reg.ReadString('Content Type')
  finally
reg.Free;
  end;
   end;

   procedure TForm1.UploadFile(url, Filename: string);
   var
  MultiPartFormDataStream: TMsMultiPartFormDataStream;
  fStream: TFileStream;
   begin
  fStream := TFileStream.Create(Filename, fmOpenRead);
  MultiPartFormDataStream := TMsMultiPartFormDataStream.create;
  MultiPartFormDataStream.AddFile('fileupload1',
   ExtractFileName(filename), GetMimeType(Filename), fstream);
  fStream.free;
  //there is a bug in the HFS code so we need to add a dummy field 
here

  MultiPartFormDataStream.AddFormField('fileupload2', '');
  MultiPartFormDataStream.PrepareStreamForDispatch;
  MultiPartFormDataStream.Position := 0;
  Memo1.Lines.LoadFromStream(MultiPartFormDataStream);
  MultiPartFormDataStream.Position := 0;
  HttpCli1.ContentTypePost := 'multipart/form-data;
   boundary='+MultiPartFormDataStream.Boundary;
  HttpCli1.SendStream := MultiPartFormDataStream;
  HttpCli1.URL := url;
  HttpCli1.Post;
  HttpCli1.SendStream.free;
   end;

   procedure TForm1.Button1Click(Sender: TObject);
   begin
  if OpenDialog1.Execute then
UploadFile('http://81.184.21.22:100/hfs/', OpenDialog1.FileName);
   end;

I have just now upload a file with this code to your HFS 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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.862 / Base de datos de virus: 271.1.1/3192 - Fecha de la version: 
10/12/10 08:34:00



--
Xavier Mor-Mur

--
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] help on httpcli post

2010-10-11 Thread Xavier Mor-Mur

 Hello to all
I try to include http get and post to my program and doing tests on 
OverbyteIcshttptst demo.

I get function GET work but not with function POST.

I configured at home free HFS - HTTP File Server from 
http://www.rejetto.com/hfs/

When running demo I set
URL = http://81.184.21.22:100/hfs/c-obfuscado.txt
Data = C:\Mis documentos\c-obfuscado.txt
Button GET works and how text file in panel
Button POST give sequence events bellow.

Sure I missing to do something but I don't know what.
You can play with this HFS server ( http://81.184.21.22:100 ) as I have 
to work with some ones like this.


Thanks for any help
Xavi

Sequence of events for POST.


[HttpCli1StateChange]

[HttpCli1StateChange]

[HttpCli1StateChange]

[HttpCli1StateChange]

[HttpCli1StateChange]

[HttpCli1RequestHeaderBegin]

[HttpCli1Command]
POST /hfs/c-obfuscado.txt HTTP/1.0

[HttpCli1Command]
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*

[HttpCli1Command]
Content-Type: application/x-www-form-urlencoded

[HttpCli1Command]
User-Agent: Mozilla/3.0 (compatible)

[HttpCli1Command]
Host: 192.168.2.2:100

[HttpCli1Command]
Content-Length: 33

[HttpCli1RequestHeaderEnd]

[HttpCli1Command]


[HttpCli1SendBegin]

[HttpCli1SendData]
33

[HttpCli1SendEnd]

[HttpCli1StateChange]

[HttpCli1StateChange]
POST Failed !
StatusCode   = 404
ReasonPhrase = Request aborted on timeout

[RequestDone Error]
8

--
Xavier Mor-Mur

--
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] THtmlSmtpCli and inline image lost

2010-08-30 Thread Xavier Mor-Mur

 Hello
I get also that with my private account. Also I get something like this 
with my account at work (server it's Atmail Webmail Client).


Next there is result of some check I done using my htmlsmtcli program 
(using latest revision from svn):


15 images send to :
- Orange and Atmail accounts : first 9 images are treated as multipart, 
next 6 images are treated as attached.

- Gmail account : all images are displayed as multipart

Forwarding Gmail mail to Orange and Atmail account :
- Orange account : as with my program.
- Atmail account : all images as multipart.

Orange webmail may have a limit on multipart images.
Atmail show on different way mail send using ICS or Gmail.

I hope this help on any way

Regards,
Xavi

Al 30/08/2010 21:32, En/na Fabrice Vendé ha escrit:

 Hello,


I have a strange problem with THtmlSmtpCli in ICS-V7 Distribution (Sep 
12, 2009 or last SVN built Revision 579),  or ICS-V6 Distribution (Sep 
12, 2009)  on Delphi 2007 or 2010.
When I send an email with more than 10 inline images (multipart), 
images after the 9th are not displayed on Orange webmail.

It work fine on other webmail like Gmail or Hotmail.
It work fine with Indy SMTP component are any email client. It's only 
a THtmlSmtpCli problem.
Like if Orange Webmail don't like TSmtpCli content and cut after more 
than 9 inline images.


It can be easily tested with OverbyteIcsMailHtml.dpr (in 
http://svn.overbyte.be:8443/svn/ics/branches/icsv7/Delphi/Internet/ )

 with more than 10 inline image send to an Orange webmail.


Nevertheless I have found a solution which work fine :
In OverbyteIcsSmtpProt.pas

Change :
StrPCopy(PAnsiChar(MsgLine), 'Content-ID: IMAGE' +
 IcsIntToStrA(FImageNumber) + '')
To :
StrPCopy(PAnsiChar(MsgLine), 'Content-ID: IMAGE' +
 IcsIntToStrA(FImageNumber) + 'INCLD')


Does Content-ID: IMAGE10 is to basic or already use for another 
thing in Orange web client ?



Best regards,
-
Fabrice


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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.851 / Base de datos de virus: 271.1.1/3102 - Fecha de la version: 
08/30/10 08:35:00



--
Xavier Mor-Mur

--
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] smtp error 10061 sending mail on one pc

2010-07-01 Thread Xavier Mor-Mur

 Thanks Angus for your tip
As I can I'll include this.

Xavi

Al 01/07/2010 08:59, En/na Angus Robertson - Magenta Systems Ltd ha escrit:

One pc get Error 10061 on connect when sending any mail,

You should use the function GetWinsockErr () or WSocketErrorDesc () (and
GetWindowsErr() for files) in OverbyteIcsWSocket, so your application
returns textual errors.

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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.830 / Base de datos de virus: 271.1.1/2975 - Fecha de la version: 
07/01/10 08:35:00



--
Xavier Mor-Mur

--
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] smtp error 10061 sending mail on one pc

2010-07-01 Thread Xavier Mor-Mur

 Thanks dZ

I'll do more exhaustive check on that pc.
Last test I do was include one button with all actions on it's click 
event and worked fine on two pc's but not on third.
If you or someone have any idea where or what to check on that pc where 
welcome.


Thanks again for all

Xavi

Al 01/07/2010 03:47, En/na DZ-Jay ha escrit:

On Jun 30, 2010, at 19:25, Xavier Mor-Mur wrote:


I would appreciate any help about error 10061.
One pc get Error 10061 on connect when sending any mail, other 2 pc have no 
problems.
Program, utility and smtp configuration it's the same for all 3 terminals 
(windows vista) and all parameters retrieved from server.
I can't find any info for errors  ~575
I checked antivirus and local firewall, the same for all 3 pc's.
What means this errors and what actions I should take?
There is any way to force a more detailed debug to find what's wrong on that pc?

Hello:
Typical protocol errors fall within 500 - 599.  Error numbers greater than 10,000 
are WinSock error codes.  Code 10061 means Connection Refused, and it usually 
refers to a host not having a server listening on the requested port.

For more information on WinSock error codes, consult the Windows SDK 
documentation that comes with Delphi, or MSDN:

http://msdn.microsoft.com/en-us/library/aa924071.aspx

dZ.





Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.830 / Base de datos de virus: 271.1.1/2975 - Fecha de la version: 
07/01/10 08:35:00



--
Xavier Mor-Mur

--
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] Request for minor enhancement

2010-05-01 Thread Xavier Mor-Mur

Hello

Recently I send email with embedded png image and image is inserted but 
not displayed.
Checking mail I found png is inserted as Content-Type: 
application/octet-stream;

Was possible include next changes. With it png images are correctly shown.

Regards

Xavi


Units I modified :

OverbyteIcsHttpProt.pas

constructor THttpCli.Create(Aowner:TComponent);
Line 1328 changed
from :  'image/jpeg, image/pjpeg, */*';
to :  'image/jpeg, image/pjpeg, 
image/png, */*';



OverbyteIcsMimeUtils.pas

function FilenameToContentType(FileName : String) : String;

else if (Ext = 'jpg') or (Ext = 'jpeg') then
Result := 'image/jpeg'
// added start
else if Ext = 'png' then
Result := 'image/png'
// added end
else if Ext = 'txt' then
Result := 'text/plain'

--
Xavier Mor-Mur

--
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] Error updating CB2009

2010-05-01 Thread Xavier Mor-Mur

Hello

Sure I doing something bad, but when I update OverbyteIcs I get next error

Package: C:\Users\.\OverbyteIcsCB2009Run.bpl can't be installed 
because it is not a design time package.


Closing and reopening CB2009 then install runs well.

What is the best way to update OverbyteIcs component?

Thanks

Xavi


--
Xavier Mor-Mur

--
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] Error updating CB2009

2010-05-01 Thread Xavier Mor-Mur
I think I found solution. Con someone confirm next steps to 
install/update OverbyteIcs

1 - Build OverbyteIcsCB2009Run.bpl
2 - Build OverbyteIcsCB2009Design.bpl
3 - Install OverbyteIcsCB2009Design.bpl

Many thanks for your help

Xavi

Al 01/05/2010 18:52, En/na Xavier Mor-Mur ha escrit:

Hello

Sure I doing something bad, but when I update OverbyteIcs I get next 
error


Package: C:\Users\.\OverbyteIcsCB2009Run.bpl can't be installed 
because it is not a design time package.


Closing and reopening CB2009 then install runs well.

What is the best way to update OverbyteIcs component?

Thanks

Xavi




Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.814 / Base de datos de virus: 271.1.1/2847 - Fecha de la version: 
05/01/10 08:27:00

   


--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-29 Thread Xavier Mor-Mur

Hi RTT
Yes I use UrlDecode from OverbyteIcsUrl.hpp with defaults SrcCodePage 
and DetectUtf8. Alternative, I not found other, was include Indy 
component but using ICS I think isn't unnecessary.

I will check using no default parameters.

Thanks again
Xavi


Al 29/04/2010 03:16, En/na RTT ha escrit:

Hi Xavier,
The UTF8Decode is being performed automatically probably because you 
are using the UrlDecode function from OverbyteIcsHttpSrv. If you check 
its definition,


function UrlDecode(const Url: string; SrcCodePage: LongWord = CP_ACP;  
DetectUtf8: Boolean = TRUE): string;


there is a, default set to true, parameter,  DetectUtf8, to define if 
the auto-detection, and decoding, of UTF8 encoded strings must be made 
automatically by the function after the URLDecode conversion



Hi RTT

Thanks for your tips. Finally I get it work but I should write code a 
bit different


String usStr; (or UnicodeString usStr;)
AnsiString asStr;

usStr = URLDEcode( Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg );
asStr = usStr; --- Compiler introduce required conversion code

using
 asStr = UTF8Decode( usStr );
or
asSTR = UTF8Decode( URLDEcode( 
Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg ) );


give asStr = NULL
I think D2009 and BC2009 works diferent when doing inline automatic 
conversions.


Many thanks for all

Xavi



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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la version: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-29 Thread Xavier Mor-Mur

Hello Arno
Thanks your comments. I need update my head from ansi to unicode :-)
Should not be problem, or that I think, converting unicode encoded files 
to ansi. as all files will created on local network.
I will read a bit more about differences between UTF8String and 
UnicodeString, help from BC2009 is not clear.


Xavi

Al 29/04/2010 08:54, En/na Arno Garrels ha escrit:

Xavier Mor-Mur wrote:

   

String usStr; (or UnicodeString usStr;)
AnsiString asStr;

usStr = URLDEcode( Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg );
asStr = usStr;--- Compiler introduce required conversion code

using
   asStr = UTF8Decode( usStr );
or
  asSTR = UTF8Decode( URLDEcode(
Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg ) );
 

Conversion from Unicode to AnsiString might lead to dataloss,
whether the source be UTF-8 or UTF-16. If you actually need a
AnsiString with code page CP_UTF8 you should use type UTF8String
instead of AnsiString.
Since 2009 the compiler is code page aware and implicitly
converts between UTF8String and (Unicode)String without
dataloss and warnings. In this case one could also write a
slighty different version of UrlDecode() that returned a
UTF8String to save a few conversions.

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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Version: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la version: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Xavier Mor-Mur

Hi to all

I need to parse text to send via email if there are declared any file.
If text is html and saved from word processors or html editors all chars 
out of first 127 ASCII set are convert using utf8 convention.

What I need is recover original text to check if declared files exists.

First I was working with BCB5 but it have reduced support for unicode 
strings.

Now I'm using BC2009 but I'm walking around the same point.

Example of I get as parameter and what I need to test :
from file I get Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg
and I need Sin título1_html_m5b7e3440.jpg

I played with ansi, wide, unicode, utf8 variables and functions with no 
success.


Thanks in advance for your help.

--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Xavier Mor-Mur

Thanks for the tip.

I tried it with no success.
URLEncode and URLDecode work apparently byte a byte and %C3%AD are 
converted as individual chars.

UTF8Encode and UTF8Decode I don't get it work.
certainly I'm doing something wrong.

Regards
Xavi

Al 28/04/2010 22:36, En/na Matt Minnis ha escrit:

The %## codes are representations of the character.  It looks like a URL
encoding scheme to me.
For example:  %20 is the space character. The %C3%AD looks to be the letter
i with the accent.
Run it though a URL Decoder and see if that doesn't get you what you are
looking for?

Matt

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Xavier Mor-Mur
Sent: Wednesday, April 28, 2010 14:19
To: ICS support mailing
Subject: [twsocket] help to convert from utf8 to ansi (locale)

Hi to all

I need to parse text to send via email if there are declared any file.
If text is html and saved from word processors or html editors all chars out
of first 127 ASCII set are convert using utf8 convention.
What I need is recover original text to check if declared files exists.

First I was working with BCB5 but it have reduced support for unicode
strings.
Now I'm using BC2009 but I'm walking around the same point.

Example of I get as parameter and what I need to test :
from file I get Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg
and I need Sin título1_html_m5b7e3440.jpg

I played with ansi, wide, unicode, utf8 variables and functions with no
success.

Thanks in advance for your help.

--
Xavier Mor-Mur

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



Se certificó que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Versión: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la versión: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Xavier Mor-Mur

I'll will work on it as I need to solve.
Situation exposed is a test after report program was not working properly.
As I detected MS-Word encode partially and OpenOffice encode fully.

Regards


Al 28/04/2010 23:41, En/na Matt Minnis ha escrit:

Al 28/04/2010 22:36, En/na Matt Minnis ha escrit:
   

  The %## codes are representations of the character.  It looks like a
  URL encoding scheme to me.
  For example:  %20 is the space character. The %C3%AD looks to be the
  letter i with the accent.
  Run it though a URL Decoder and see if that doesn't get you what you
  are looking for?

  Matt

 


--
Xavier Mor-Mur

--
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] help to convert from utf8 to ansi (locale)

2010-04-28 Thread Xavier Mor-Mur

Hi RTT

Thanks for your tips. Finally I get it work but I should write code a 
bit different


String usStr; (or UnicodeString usStr;)
AnsiString asStr;

usStr = URLDEcode( Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg );
asStr = usStr; --- Compiler introduce required conversion code

using
 asStr = UTF8Decode( usStr );
or
asSTR = UTF8Decode( URLDEcode( 
Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg ) );


give asStr = NULL
I think D2009 and BC2009 works diferent when doing inline automatic 
conversions.


Many thanks for all

Xavi


Al 29/04/2010 00:37, En/na RTT ha escrit:
Obviously what works fine is the sequence of decode transformations on 
your encoded filename, not in the already decoded string as I posted. 
Sorry.

This is the correct example:
UTF8Decode(URLDEcode('Sin%20t%C3%ADtulo%201_html_m5b7e3440.jpg'));


This seems to work fine

UTF8Decode(URLDecode('Sin título1_html_m5b7e3440.jpg'));


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



Se certificó que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es
Versión: 9.0.814 / Base de datos de virus: 271.1.1/2840 - Fecha de la versión: 
04/28/10 08:27:00

   


--
Xavier Mor-Mur

--
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] Unknown encode used on som html page

2010-04-10 Thread Xavier Mor-Mur

I write smtp client to send html email from my application.
Html normally is a doc saved as html format. If  there are images then 
their tag have SRC coded on a way I can't find how it's done.
On Example at end you can see html generated using OpenOffice 3.1. There 
is only one image and doc name is Sin título 1.html which is used to 
declare inserted images.

I don't know if this happen using MS-Word or other word processors.

IMG SRC=Sin%20t%C3%ADtulo%201_html_m82e68f1.jpg 
image on disc is Sin título 1_html_m82e68f1.jpg
whitespace are replaced by %20
but í es replaced by %C3%AD but in utf-8 is %ED

Special characters are coded using 2 bytes and I need how to decode to 
access image to embed into email.

UrlDecode don't work as it returns Ã- (where this - is virtual dash)

I tested if page is show correctly on browsers and this is what I get for
1 - SRC=Sin%20t%C3%ADtulo%201_html_m82e68f1.jpg
2 - SRC=Sin%20t%EDtulo%201_html_m82e68f1.jpg (html file changed using 
Notepad++)

3 - SRC=Sin título 1_html_m82e68f1.jpg (html file changed using Notepad++)

Firefox 3.6 and Google Chrome 4.1 show allways page correctly
IE 8.0 only 2 and 3 are showed correctly.

Most of my clients use IE.

I hope you can give any help.

kind regards

Xavi


!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
HTML
HEAD
META HTTP-EQUIV=CONTENT-TYPE CONTENT=text/html; charset=utf-8
TITLE/TITLE
META NAME=GENERATOR CONTENT=OpenOffice.org 3.1  (Win32)
META NAME=AUTHOR CONTENT=Xavier Mor-Mur
META NAME=CREATED CONTENT=20100409;23505100
META NAME=CHANGEDBY CONTENT=Xavier Mor-Mur
META NAME=CHANGED CONTENT=20100410;22340500
STYLE TYPE=text/css
!--
@page { margin: 2cm }
P { margin-bottom: 0.21cm }
--
/STYLE
/HEAD
BODY LANG=ca-ES DIR=LTR
P STYLE=margin-bottom: 0cmBR
/P
P STYLE=margin-bottom: 0cmIMG 
SRC=Sin%20t%C3%ADtulo%201_html_m82e68f1.jpg NAME=gráficos1 
ALIGN=LEFT WIDTH=145 HEIGHT=61 BORDER=0BR CLEAR=LEFTBR

/P
P STYLE=margin-bottom: 0cmBR
/P
/BODY
/HTML

--
Xavier Mor-Mur

--
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] ftp dir dot at begin

2009-12-05 Thread Xavier Mor-Mur

one point more to take in consideration : file mask send to server.
'*.*' may not work as '*'.
to retrieve all files the better option is '*'

i hope this help a  bit

xavi


En/na Francois PIETTE ha escrit:

hi, i'm new here i use ICS in a new project of ftp client
and FtpClient1.Dir, FtpClient1.DirAsync don't show file or dir 
beginning with a dot

but if i use flash fxp i see weel file and dir with . at begin
ftp server is proftpd 1.32 last stable
ics is last cvs

on another server unix i have tried it work, i have tried with the 
demo OverbyteIcsFtpTst.dproj with same result on proftpd i don't see 
.dir .file


how can i found problem?


The ICS FTP component do not generate the file list itself. That's the 
server which generate the file list. The component just get it and 
give it untouched to the application. So if some file do not appear, 
then you have to look at server side. It could be related to user 
permission. If the server has log capabilities, then log the activity 
from falsh fxp client and then from ICS FTP client and search for 
differences.



i can send test account read only to a admin if you want


Yes, please.

--
francois.pie...@overbyte.be
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



Se certifico que el correo entrante no contiene virus.
Comprobada por AVG - www.avg.es 
Version: 9.0.709 / Base de datos de virus: 270.14.93/2544 - Fecha de la version: 12/04/09 08:32:00


  

--
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] Take care with McAfee and last update : .ini files may be removed

2007-06-19 Thread Xavier Mor-Mur
Hello

Take care with your .ini files if you have installed McAfee antivirus and
their update at 15:30 UTC.
This update introduced a new test for .ini files and maybe removed if the
contents have references to shutdown, rundll and maybe some other programs
on its black list.
I detected this at 17:30 UTC when at office started daily backup : 12 .ini
files where removed. I restored this files and tested : only have text but
comments with examples how to stop pc for w9x, wme, wnt, ...
I don't know if this will happen with all versions of McAfee antivirus.
If you have clients with your programs using .ini files inform them if
necessary.

regards
-
Xavier Mor-Mur
[EMAIL PROTECTED]



No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.9.1/854 - Release Date: 19/06/2007
13:12
-- 
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] Help to retrieve datetime from sntp server

2006-03-09 Thread Xavier Mor-Mur
Thanks Angus for your  quick reply.
I download your component and will check it.

Best regards
Xavier

En/na Angus Robertson - Magenta Systems Ltd ha escrit:
 I need write o function to retrieve date-time from a timeservers.
 This is needed to prevent changes on date and/or time on local 
 network pc's, included local server, because I should upload/download 
 small files which need real date time assigned.

 I take a look to TWSTimeClient from Chris Barber found at usermade 
 page, but I can't get write a working program.
 

 That client did not support SNTP, only the old time protocol that uses 
 whole seconds and does not allow for the round trip time.  I updated it 
 many years ago for SNTP and to add UTC functions to change the PC time.  

 I also updated Nathan Anderson's time server component to support SNTP. 

 You can download both from my ICS page:  

 http://www.magsys.co.uk/delphi/magics.asp

 Sorry, there is no demo program, but I use them myself hourly in my DUN 
 Manager application.  I strongly recommend you compare the results of 
 two time servers before actually changing the PC time, you'd be 
 surprised how often time servers return bad time. 

 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


[twsocket] Help to retrieve datetime from sntp server

2006-03-08 Thread Xavier Mor-Mur
Hi to All

I need a little bit help.
I need write o function to retrieve date-time from a timeservers.
This is needed to prevent changes on date and/or time on local network 
pc's, included local server, because I should upload/download small 
files which need real date time assigned.

I take a look to TWSTimeClient from Chris Barber found at usermade page, 
but I can't get write a working program.
Program I write access to internet, firewall detects it, but don't get 
anything.

I would appreciate any help and if possible  small project  showing what 
to do.
Thanks in advance.

Xavier

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