StrConv(UData, vbFromUnicode) Problem

  • Thread starter Thread starter sbcglobal
  • Start date Start date
S

sbcglobal

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?
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top