What does vbFromUnicode mean?

I am looking at some old VB6 code, and I come across statements like -

   TempArray() = StrConv(PassedString, vbFromUnicode)

What does it mean?

+3
source share
1 answer

It requires a unicode string (any string in VB is in Unicode) and converts it to an array of bytes using the current system code page for programs other than Unicode.

  • There will be one byte per character if it is a single-byte code page (for example, English and Western Europe 1252).
  • There may be several bytes per character if it is a multi-byte code page (e.g. simplified Chinese).

Characters not found in this code page are replaced by question marks ( ?).

+6
source

All Articles