This is an implementation detail that you donβt need to worry about (unless you leave the Basic Multilingual Plane , in which case it will be difficult, since Char
are UTF-16 code units ).
When this becomes relevant, that is, when the string is converted to an array of bytes, you must select the encoding to use:
Dim S1 As String = ... Dim utf8Bytes = Encoding.UTF8.GetBytes(S1) Dim utf16Bytes = Encoding.Unicode.GetBytes(S1) Dim western As New Encoding(1252) Dim westernBytes = western.GetBytes(S1)
source share