Re: [twsocket] help to convert from utf8 to ansi (locale)

2010-04-29 Thread Arno Garrels
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(

[twsocket] FTPCli error handling

2010-04-29 Thread Anton Sviridov
Hello all, it's me again and again with a question about FTPCli. Current manner of reporting local errors is to set code 550 with an explaining message and call TriggerRequestDone. But I find it very confusing: for example, when trying to GET some file or directory listing we could receive true

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

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

Re: [twsocket] FTPCli error handling

2010-04-29 Thread Arno Garrels
Anton Sviridov wrote: unconvenient). So I think something is needed to be done to differentiate local problems of remote ones. I'd prefer changing 550 code to some another value unused by FTP servers (maybe even over 600 to avoid intersections for sure). but the ICS policy is NOT BREAK

Re: [twsocket] FTPCli error handling

2010-04-29 Thread Anton Sviridov
Hello Arno, If a workaround is needed then IMO a field FLastLocalError of type LongWord or Integer could receive a meaningful error code and a method GetLastLocalError could return and reset the value back to 0? Well, it's something. Though I'm still not sure what's the best way to deal with

Re: [twsocket] FTPCli error handling

2010-04-29 Thread Francois PIETTE
Have you tried calling GetLastError or WSAGetLastError ? -- 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 - Original Message - From: Anton Sviridov an...@rambler.ru