Replacing quotation mark?

If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
3 posts Page 1 of 1
Contributors
User avatar
Smiley
VIP - Donator
VIP - Donator
Posts: 269
Joined: Sat Dec 19, 2009 3:39 pm

Replacing quotation mark?
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;
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: Replacing quotation mark?
Shim
make sure the character is set to UTF-8 by the way is it in VB.NET?
Find my programs on Softpedia
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Replacing quotation mark?
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 :)
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
3 posts Page 1 of 1
Return to “Coding Help & Support”