File parsers can return text in RTF or UTF8.
A file parser can return data in formats other than plain text, and a file parser that returns the requested format will have precedence over a file parser that returns a different format.
To indicate the file formats your parser can return, set one or more of the following flags in dtsViewerInfo.flags: viReturnsRtf, or viUtf8CharSet. When your parser's makeViewer function is called, the dtsMakeViewerParams struct will indicate the requested output format in dtsMakeViewerParams.outputFormat.
If your file parser receives a file format in dtsMakeViewerParams.outputFormat that it cannot generate, makeViewer2 should return NULL so another file parser can be invoked to process the file.
To ensure that hit highlighting is consistent, the text and word breaks must be identical regardless of the format returned.
RTF returned from a file parser can contain the following tags:
\u, \line, \par, \b, \i, \dtSearchField
Other tags will be ignored. Characters with codes higher than 128 (i.e., any Unicode characters) must be returned using the \u syntax.
A file parser that returns RTF can return fielded data by using the \dtSearchField tag, like this:
If the field is nested, the fully qualified field name must be provided, as follows:
A field automatically terminates the previous field. For example:
In the above example, john smith is part of a field named name. The record/patient field ends when the name field begins. To indicate the end of a field, use a blank field name, like this: