Plain text files are show up incorrectly in Canvas preview mode and SpeedGrader.
This issue affects plain text (.txt) files that are uploaded to Canvas, including instructor uploads and student submissions. The plain text files display incorrectly in preview mode and SpeedGrader, but they download correctly.
For more information, visit the Canvas Community: https://community.canvaslms.com/message/101218-file-preview-showing-incorrect-file-contents.
This issue is still present as of 5/14/2020. Instructure is aware of this ongoing issue.
If you have uploaded .txt files to your Canvas course for student use, inform students that these files must be downloaded for best results.
For student assignments submitted as .txt files, download the submissions and do not use SpeedGrader.