[Gambas-user] simple replace question

2009-03-04 Thread Bruce
Hi guys, I'm trying to convert a string to float. The string contents are 56½. I've tried both replace(st,½,.5) and replace(st, Chr$(194), .5 ) neither helps. Any ideas? tia ted -- Open Source Business Conference

Re: [Gambas-user] simple replace question

2009-03-04 Thread Stefano Palmeri
Il mercoledì 4 marzo 2009 11:55:44 Bruce ha scritto: Hi guys, I'm trying to convert a string to float. The string contents are 56½. I've tried both replace(st,½,.5) and replace(st, Chr$(194), .5 ) neither helps. Any ideas? tia ted Strange. replace(st,½,.5) works on my system.

Re: [Gambas-user] simple replace question

2009-03-04 Thread Emil Tchekov
Is your string UTF encoded? You should check if your character code is exactly 194 and not wider... 16 Bits perhaps? Any Hex-Viewer will help. regards Emil On Wednesday 04 March 2009 11:55:44 Bruce wrote: Hi guys, I'm trying to convert a string to float. The string contents are 56½. I've

Re: [Gambas-user] simple replace question

2009-03-04 Thread Rolf-Werner Eilert
Bruce schrieb: On Wednesday 04 March 2009 23:00:00 Stefano Palmeri wrote: Strange. replace(st,½,.5) works on my system. Gambas 2.11.1 Saluti, Stefano Damn! And I still can't get it working. The only thing I've been able to decipher is that Len(st)=4 not 3. Using gambas 2.9.?? as

Re: [Gambas-user] simple replace question

2009-03-04 Thread Rolf-Werner Eilert
Bruce schrieb: On Thursday 05 March 2009 01:34:29 Rolf-Werner Eilert wrote: newString = Conv(st, UTF-8, ASCII) Replace(st, ½, .5) Thanks RW, That got me started at least. So far: TRY wx = Conv(lp1[5], UTF-8, ASCII) TRY wx = Replace(wx, ½, .5) TRY wx = Replace(wx, ¼,

Re: [Gambas-user] simple replace question

2009-03-04 Thread Rolf-Werner Eilert
Bruce schrieb: On Thursday 05 March 2009 01:34:29 Rolf-Werner Eilert wrote: newString = Conv(st, UTF-8, ASCII) Replace(st, ½, .5) Thanks RW, That got me started at least. So far: TRY wx = Conv(lp1[5], UTF-8, ASCII) TRY wx = Replace(wx, ½, .5) TRY wx = Replace(wx, ¼,

Re: [Gambas-user] simple replace question

2009-03-04 Thread Ron_1st
On Wednesday 04 March 2009, Rolf-Werner Eilert wrote: Bruce schrieb: On Thursday 05 March 2009 01:34:29 Rolf-Werner Eilert wrote: newString = Conv(st, UTF-8, ASCII) Replace(st, ½, .5) Thanks RW, That got me started at least. So far: TRY wx = Conv(lp1[5], UTF-8, ASCII)

Re: [Gambas-user] simple replace question

2009-03-04 Thread Benoît Minisini
Bruce schrieb: On Thursday 05 March 2009 01:34:29 Rolf-Werner Eilert wrote: newString = Conv(st, UTF-8, ASCII) Replace(st, ½, .5) Thanks RW, That got me started at least. So far: TRY wx = Conv(lp1[5], UTF-8, ASCII) TRY wx = Replace(wx, ½, .5) TRY wx =