We break down how computers turn bytes into characters and back: how
ASCII,
UTF-8 and
UTF-16 differ, what
BOM and byte order (Endian) are, where to use which encoding, and how to explicitly set encoding in C# via
System.Text.Encoding. We'll show practical examples with
StreamReader/
StreamWriter, the methods
File.WriteAllText/
File.ReadAllText, and also explain where "mojibake" comes from when encodings mismatch. At the end — a summary comparison table.