things lacking in Squeak (RTF reader and writer)

Hannes Hirzel hannes.hirzel.squeaklist at bluewin.ch
Tue Dec 16 21:39:51 UTC 2003


Hi Lex

Lex Spoon wrote:
> Duane Maxwell <dmaxwell at san.rr.com> wrote:
> 
>>RTF is about the closest thing to a universally recognized rich text  
>>format.  Virtually every word processor reads and writes it, and there  
>>are libraries for most programming languages available.  Mac OS X uses  
>>RTF as its primary rich text format - it's what's generated by  
>>TextEdit, and Cocoa has an API for using it.
>>
>>It's very well documented, though I think that there are few complete  
>>implementations. Format specification is here:
>>
>>http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ 
>>dnrtfspec/html/rtfspec.asp
>>
> 
> 
> The last time I played with RTF was a few years ago, but it was a bad
> experience.  I went on a jihad asking everynoe to use RTF, because it
> seemed like such a nice solution to the problem of portable word
> processing formats.  However, it didn't work out.  People sent me RTF's
> that none of my tools could could read.  The problem was that RTF files
> generated by MS tools tended to included MS-specific objects in them. 
> You'd be going through the file and see messages along the lines of
> "unparsable object  excel210413".

The convention suggested in the specification is that RTF parsers should 
ignore RTF code they cannot understand.


> Has this situation really changed?  If not, then we can never expect to
> reliably import RTF.  We can export stuff that is strictly conformant,
> but  there are many of the existing tools that export stuff we will not
> be able to read.

Yes. But it would be already great to read and write basic RTF

- font selection
- style selection (bold, italics, underlined)
- font size
- font color

The specs for  this have been pretty much the same for the last 10 years.

> To contrast, there are plenty of open formats around, many of which are
> older and better established than RTF.  For word processing, there is
> TeX, SGML, HTML, and gee, plain old TEXT.  

TeX and HTML would be fine.

SGML depends on a DTD, it may be relatively complex and SGML is not 
widely used.

Text is already implemented ;-)



> Further, there are plenty of non-technical reasons to avoid things under
> MS's sponsorship and control.  At any time MS may pull the plug and
> start emiting non-standard content, and they already have a long history
> of doing it!  

MS has various products in various versions which deal with RTF as an 
exchange format (even in the OS). They just cannot afford to become 
incompatible with themselvelves...


> I'm astounded to learn that MacOS X is using this format widely.  

And what does this tell us?


> 
> In summary, I could see that it would be nice for Squeak to make a best
> effort to parse RTF if we are presented with it.  

I agree. And it would be nice to have a little WordPad like editor in 
Squeak. AFAIK the original Smalltalk system had something like that.


Hannes





More information about the Squeak-dev mailing list