CodeBlue
CodeBlue

Reputation: 15389

What does vbFromUnicode mean?

I am going through some old VB6 code and I come across statements like -

   TempArray() = StrConv(PassedString, vbFromUnicode)

What does this mean?

Upvotes: 4

Views: 7940

Answers (1)

GSerg
GSerg

Reputation: 78185

It takes a unicode string (any string in VB is in Unicode) and converts it to a byte array, using the current system codepage for non-unicode programs.

  • There will be one byte per character if it is a single-byte codepage (e.g. English and Western Europe 1252)
  • There may be multiple bytes per character if it is a multi-byte code page (e.g. Simplified Chinese)

Characters not found in that codepage are replaced with question marks (?).

Upvotes: 7

Related Questions