Re: RTF specs

Subject: Re: RTF specs
From: James Robertson <jamesr@xxxxxxxxxxxxxx>
Date: Wed, 03 Feb 1999 14:33:17 +1000
At 07:23 3/02/1999 , Jeremy H. Griffith wrote:

  | On Mon, 01 Feb 1999 21:39:23 +0100, Chris Lilley <chris@xxxxxx> wrote:
  | 
  | >Thanks. So, all RTF readers will be able to import documents conforming
  | >to this spec.
  | 
  | Sorry, no.  While RTF's design seems intended to permit this, most
  | reader implementations (such as the MS WinHelp compiler) do not
  | operate in a compliant manner.  WordPerfect is especially nasty.
  | Even MS Word, the "reference implementation", is inconsistent.
  | 
  | >My initial objection - which was just a passing comment
  | >anyway - was based on the impression that the RTF emitted by current
  | >applications changed with new software releases - a moving target. 
  | 
  | This is true.  It's also a very poorly documented moving target.
  | The docs *look* comprehensive at first glance, but when you actually
  | proceed to implementation of anything non-trivial, you quickly find
  | that the "language" is badly underspecified.  You need to do a lot
  | of testing, with MS Word, to find just the right constructions.
  | But then, it is a "standard" with no real standards group behind
  | it, only MS...

I can strongly support this.

I've done a _lot_ of low-level gunging through RTF, both
reading and writing.

The RTF spec lists all the codes that can appear in the
various version of RTF. It also gives a _very_ brief
description of what they mean.

However ... it does not state (in the large part), how
these codes are used. That is what order they appear in,
how they interract, what various combinations of codes
mean, etc.

Worse yet, with the addition of field codes, a lot of
what should have been rtf "\whatever" codes get swallowed
up by a generic {\FIELD ...} code. These field codes are
not documented in the spec at all, and can only be found
by looking in the Word "Insert Field" command. (Side note:
the format displayed in Word is different to the one
that appears in the RTF.)

If all this has scared you, then I've achieved my goal.
RTF is one of the worst formats I have ever had to
deal with.

That being said, if you use the RTF 1.3 spec, then
this documents most of the functionality that you'll want.
And because it is so old, almost everything imports
it. Even it does work a little differently between
the various version of Word, not to mention the other
wordprocessors ...

And for God sake, don't look how RTF 1.5 (Word 97)
implemented text frames ... scary, scary stuff.

Good luck,

J


-------------------------
James Robertson
Step Two Designs Pty Ltd
SGML, XML & HTML Consultancy
http://www.steptwo.com.au/
jamesr@xxxxxxxxxxxxxx

"Beyond the Idea"
 ACN 081 019 623


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread