There is a known glitch in macOS where question marks in boxes will replace text. It does not damage files. Reboot your computer and it should correct the error temporarily.
Make sure you are saving your work frequently.