In some programming languages that's about as sophisticated as it gets.
(MyMemoryBlock.StringValue(0,8), Encodings.UTF16 )DefineEncoding
When you already have text in one encoding, but need to work with it in another encoding you use the ConvertEncoding method. For example, you may have a database that only works with UTF-16, so you want to convert text entered by the user to UTF-16 before you write it to the database:
Dim name As String = NameField.Text
name = ConvertEncoding(name, Encodings.UTF16)
The Encodings module includes an enumeration with dozens of common encodings predefined for you.
So make sure when you get data from outside of your applications that you know what encoding it is or that you have defined it before you being using it!