E.6. Using Unicode

Visual Studio uses Unicode UTF-16 encoding to represent all characters. Figure E.3 uses Visual Basic to display the text "Welcome to Unicode!" in eight different languages: English, French, German, Japanese, Portuguese, Russian, Spanish and Traditional Chinese.

Figure E.3. Windows application demonstrating Unicode encoding.
					1
					' Fig. F.3: Unicode.vb
					2
					' Using Unicode encoding.
					3
					Public Class FrmUnicodeDemo
 4
					Private Sub FrmUnicodeDemo_Load(ByVal sender As System.Object, _
 5
					ByVal e As System.EventArgs) Handles MyBase.Load
 6
					'English
					7        lblEnglish.Text = ChrW(&H57) & ChrW(&H65) & ChrW(&H6C) & _
 8           ChrW(&H63) & ChrW(&H6F) & ChrW(&H6D) & ChrW(&H65) & _
 9           ChrW(&H20) & ChrW(&H74) & ChrW(&H6F) & ChrW(&H20) & _
10
					"Unicode" & ChrW( ...

Get Visual Basic 2005 for Programmers: Deitel Developer Series, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.