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 its the latest > available for PCLinuxOS (see below). >
The version will not matter, I guess. Try converting your string into ASCII before replacing: newString = Conv(st, "UTF-8", "ASCII") Replace(st, "½", ".5") On my old ASCII-table ½ is chr$(171). So it should work with this one, as it's known in ASCII. If you get an error 32, your string wasn't UTF-8. Next idea: use String.Code to find out the Hex-code of each single character in "st". Then rewrite the replace function for this combination of characters - something like Replace(st, chr$(30) & chr$(1) & chr$(123), ".5")... Hope it helps... Rolf ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user