We are importing a source database X to our target database Y.
X has blobs of text in RTF format which are somehow displayed in its application.
Our web app can't display RTF, so we were instructed to convert those blobs of RTF into files in our database Y.
We simply copy the RTF blob from X, where it is nvarchar, into a column in Y which we already use for storing attachments, which is of type varbinary. Then we write it out as a file foo.rtf when the user wants to view it - so they can download and open the RTF in Word.
Unfortunately the foo.rtf file, when opened in Word, just looks like raw RTF, Something like
{\rtf1\ansi\ansicpg1252\deff0\deftab1134{\fonttbl{....
What do we need to do in order to correctly convert this RTF "blob of text" into an actual RTF file? It looks like just saving the bytes doesn't work.
Thank you.