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 B

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 escri

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

2010-04-28 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

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

2010-04-28 Thread RTT
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, defa

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 asS

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

2010-04-28 Thread RTT
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

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

2010-04-28 Thread RTT
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

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:

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

2010-04-28 Thread Matt Minnis
some point... Matt -Original Message- From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On Behalf Of Xavier Mor-Mur Sent: Wednesday, April 28, 2010 15:53 To: ICS support mailing Subject: Re: [twsocket] help to convert from utf8 to ansi (locale) Thanks for the tip. I trie

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

2010-04-28 Thread Xavier Mor-Mur
-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 ema

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

2010-04-28 Thread Matt Minnis
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

[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