At 5:56 PM +0100 22/10/06, Carlos M wrote:
On Oct 22, 2006 1:21 AM, Dr Gerard Hammond wrote:
Thanks for the code. I like it and I use it but bec careful
with this.
I recommend that you change it to:
Function AsText(Extends i as integer, fmt as string = "-0")
As string
return DefineEncoding(Format(i, fmt), Encodings.UTF8)
End Function
The top version returns a NIL encoded string and if you later
concatenate this with another string, the resulting string
will also have a NIL encoding and then you can get bitten by
some subtle (ie catastrophic) differences with InStr(),
countStr etc.
The bottom one fixes this nasty little creepy crawly ....
(Can you tell I just got bitten by it...)
On Windows 2000 by using just "Return Format(i, fmt)" returns a UTF-8
string - at least that's what is shows on debugger.
Tested with 2005r4 and 2006r4.
Carlos
Hi Carlos.
Thanks for this report. I am a little confused now as well.
When I went to REAL bug this I couldn't re-create with a simple app.
But it was definitely happening in my large REAL SQL db app.
Que?
--
Cheers,
Dr Gerard Hammond
MacSOS Solutions
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>