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
ubject: Re: [twsocket] help to convert from utf8 to ansi (locale) 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 somethin

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

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

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