Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does vbFromUnicode mean?

Tags:

vb6

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

   TempArray() = StrConv(PassedString, vbFromUnicode)

What does this mean?

like image 264
CodeBlue Avatar asked Oct 11 '25 08:10

CodeBlue


1 Answers

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

like image 120
GSerg Avatar answered Oct 16 '25 12:10

GSerg