Page 1 of 1

Replacing quotation mark?

Posted: Wed Dec 18, 2013 10:08 am
by Smiley
Hi Guys

I have been working a little bit on offBeat and have run into a little issue i cant seem to replace
– with — in a string, any help would be appreciated.

Here's my code:
Code: Select all
st = st.Replace("â€""", "—")
Thanks Smiley cooll;

Re: Replacing quotation mark?

Posted: Wed Dec 18, 2013 12:14 pm
by Shim
make sure the character is set to UTF-8 by the way is it in VB.NET?

Re: Replacing quotation mark?

Posted: Wed Dec 18, 2013 12:43 pm
by Dummy1912
#Smiley

not sure but this can maybe the result
i can't test it i don't have vs open :)
Code: Select all
'st = st.Replace("â€""", "—")
st = st.Replace(Chr(226) & Chr(8364), Chr(8212))
'or
st = st.Replace("â" & "€", "—")
hope this works :)