coverting from ²Â§â€¢ to unicode text

dynamic_sysop

Senior Contributor
Joined
Oct 1, 2002
Messages
1,039
Location
Ashby, Leicestershire.
i currently reference the msn chat control library to convert from ansii text like say "™Ðynamic′§•ßrow§er™" to "™Ðynamic′§•ßrow§er™" readable format, to do this requires Msn.ConvertedString , however i was wondering if it is possible to convert from ansii / utf8 to unicode without having to use a large ocx file like the msn chat control?
say like sName = unicode(sName)
 
You can access all the old VB6 String functions (Left, Right, Split,
and Mid which is now called Substring, etc.) by typing any string
variable followed by a . and the name, just like accessing any method
from a class. You can also do this with any normal string,
"like this".Left(4)

Visual Basic:
sValue = Data.Left(3)

For your text conversion, look in the System.Text namespace for
various encoders and decoders.
 
i'm tearin me hair out :( i've tried....
Dim s as string
If s.Substring(1, 1) = "." Then Me.BeGold(s)

( ".") being the first character of the nickname
also tried
If s.Substring(1, s) = "." Then Me.BeGold(s)
and If s.Substring(1, 1) is "." Then Me.BeGold(s)
nothing seems to be working tho :S
 
Sorry for confusing you with .Left, I could've sworn it was there... :)

And the reason it isn't working is because now all indexes are
zero-based. That means that the first character's index is 0, unlike
Mid$ where the first character has the index 1.
 
Or you can use the nifty .StartsWith method

Visual Basic:
If myString.StartsWith(".") Then 'blah
 
Back
Top