When i format a double with
"\\£##.00" to show a currency with the british pound sign it appears fine when I display in a listbox.
When I add the cell contents as a ‘string’ to a longer string it has an extra character in front of it, as below;
ENTRY FEES - Â£7.00
This is an encoding problem I guess but I am not sure how to deal with it. It is for a one off system on a windows computer so I don’t need to worry about international encodings. Any pointers appreciated.
dim s as string = format(1.24, "\\£##.00")
MsgBox DefineEncoding(s, encodings.WindowsANSI)
Seems like you see an UTF-8 string as Windows ANSI.
tmp=tmp+"ENTRY FEES - £"+lbEmail.cell(lbEmail.ListIndex,5)
put a break point on that line & run your program
then check the encoding of tmp before the line executes and after
Thanks Norman and Christian, the encoding was US-ASCII. I added the line as suggested by Christian once the string was built and this works.
I need to read up a bit on encodings when I get a spare minute