TextEdit Showing Weird Encoding On Save

Hello, I'm on 11.6.5 using Textedit 1.16 (365.2).

Recently TextEdit has started showing some weird code formatting whenever I save an .rtf file. I believe it correlates with when I moved from Catalina to Big Sur, but I didn't notice right away because I don't use Textedit that often.

When I open a blank document and start typing, all is well; however, once the document is saved as an .rtf and I close TextEdit, the next time I open that document it is showing weird encoding information, which makes it very difficult to read or find any of the information in the file.

Here's an example. A .rtf that says "Testing 1,2,3,4" turns into this: {\rtf1\ansi\ansicpg1252\cocoartf2580 \cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} {*\expandedcolortbl;;} \margl1440\margr1440\vieww11520\viewh8400\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\partightenfactor0

\f0\fs24 \cf0 Testing 1,2,3,4 ?}

Interestingly, for some files Quick Look does not show the code, so the preview looks normal; however, other times even quick look shows all the coding info exactly the way it shows when I open the .rtf.

In my testing, this does not seem to happen with .rtfd (Rich Text Document with Attachments), so that's been my workaround recently. Does anyone have any idea why this might be happening and what, if anything, I can do to fix it? Thanks!

For anyone else who encounters this in the future:

Under TextEdit preferences there is a checkbox on the "Open and Save" tab which says: "Display RTF files as RTF code instead of formatted text"

I'm pretty confident I never set that myself, but perhaps it's a new default or something? Who knows. Either way, mischief managed.

TextEdit Showing Weird Encoding On Save
 
 
Q