Input and Output Classes
- slide 11 : 40
Sample use of class Encoding
Sample encodings, conversions, and decodings of a string of Danish characters.
Output from the Encoding program.
Conversions in the example
From a unicode string to a byte array in a given encoding
(
GetBytes
-
Encoding
).
From a byte array in one encoding to a byte array in another encoding
(
Convert
)
From a byte array in a given encoding to a char array (in unicode)
(
GetChars
-
Decoding
).
From a char array (in unicode) to a unicode string encoding.
(via
String
constructor)
Finding the encoding of a given text file