-2
{\rtf1\fbidis\ansi\ansicpg1256\deff0\deflang3073{\fonttbl{\f0\fnil\fcharset0 Times New Roman;}}
{\colortbl ;\red0\green0\blue0;}
\viewkind4\uc1\pard\ltrpar\cf1\ul\b\i\f0\fs29 Abdominal US  examination revealed:\par
}
Pavel Anikhouski
  • 21,776
  • 12
  • 51
  • 66
  • 4
    Possible duplicate of [How to convert an rtf string to text in C#](https://stackoverflow.com/questions/5634525/how-to-convert-an-rtf-string-to-text-in-c-sharp) – Natrium Oct 29 '19 at 11:43
  • The data is text. What do you really want. It looks like somebody took a json string and save to a file. – jdweng Oct 29 '19 at 11:43
  • 2
    @jdweng, looks like raw RTF to me. – Moo-Juice Oct 29 '19 at 11:44
  • @jdweng: That is RTF. https://en.wikipedia.org/wiki/Rich_Text_Format#Code_syntax It looks similar, but is decades older. – Christopher Oct 29 '19 at 11:45
  • Welcome, you must add details, what you tried so far, what you want to accomplish, tecnologies/languages used, etc. on your question – Sterconium Oct 29 '19 at 11:49
  • Could be either RTF or JSON. Only way you know it is RTF is the folder is "\rtf1". – jdweng Oct 29 '19 at 11:53
  • 1
    @jdweng I am pretty sure JSON would not write the string "Abdominal US examination revealed:" like this. Or contain that much string formating code like "fonttbl". This is RTF. As I said, they are easy to mix up on a glance. But there is no question here. – Christopher Oct 29 '19 at 11:56

1 Answers1

1

The string you got there, is RichText as viewed by a Word Processor like Windows Notepad.

RichText - and in particular the .rtf file format - are something very old. It was the word processor format, before .doc and office became a thing. The document distribution format before .pdf's were a thing and you wanted any form of formating (so .txt are out of question).

It is remotely human readable, but not as well as XML or JSON. It is the format used by the WindowsForms RichText box. Also the Format used by the Clipboard when you copy and paste strings. It is also a good basic interchange format. But between it being very verbose and the propietrary .doc format, it fell out of use for Documents.

You got these options:

  • store/send it declared as a .rtf file. As the format is so old and so basic, you would propably have to do computer archeology to find a word processor not able to intepret it.
  • turn this RTF into flat old Notepad level .txt format, without formating.
Christopher
  • 9,634
  • 2
  • 17
  • 31