StrConv(UData, vbFromUnicode) Problem

  • Thread starter Thread starter sbcglobal
  • Start date Start date
sbcglobal said:
I am using VS .Net 2003 and trying to convert a unicode data (vb
.net default string type?) to single byte using

BData = StrConv(UData, vbFromUnicode)

it is a method mentioned in
http://support.microsoft.com/default.aspx?scid=kb;EN-US;174923 but
the problem is vbFromUnicode is not supported in my version of vs
.net, anyone knows what is the equivalent function in vs .net
2003?

Which destination encoding do you need? For Unicode use

dim b as byte()
b = System.Text.Encoding.Unicode.GetBytes(UData)

To get other encoding, use other members of System.Text.Encoding.
 
Back
Top