The text was not necessarily corrupted

A computer file stores text as numbers called bytes. To display those numbers as letters, software needs an encoding: a set of rules that maps byte patterns to characters. If the software chooses a different encoding from the one used to save the text, the same bytes can be interpreted as different letters, punctuation, or symbols.

For example, a byte that represents a character in one regional encoding may stand for part of another character—or a completely different symbol—in another. The result is often called mojibake: readable data rendered as apparent nonsense because the reader applied the wrong rules.

Why the mismatch happens

Older systems often relied on regional encodings, each designed around the characters needed for a particular language or group of languages. A file might contain the text but no reliable label telling later software which encoding to use. When that file moves between programs or systems, the receiving software has to guess. A wrong guess can turn accented letters or non-Latin writing into strings of odd marks.

Modern text exchange more commonly uses Unicode, especially UTF-8, which can represent characters from many writing systems. But a file can still be misread if a program treats its bytes as a different encoding, or if a conversion is handled incorrectly along the way.

When the original can be recovered

If the bytes are still intact, opening or converting the text with the correct encoding can often restore the intended characters. But if software has already saved the mistaken display as new text, it may have replaced the original bytes with the wrong symbols. At that point, correcting the display alone may not be enough; the lost information might have to be reconstructed.