[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fop-user
Subject:    Re: RTF and table/column widths
From:       Paul Tremblay <phthenry () iglou ! com>
Date:       2006-02-28 23:54:18
Message-ID: 20060228235418.GB8960 () localhost ! localdomain
[Download RAW message or body]

On Tue, Feb 28, 2006 at 07:07:16PM +0100, Jeremias Maerki wrote:
> 
> Nope, according to the RTF spec, the output should be in "US-ASCII"
> (7-bit) for portability. UTF-8 is definitely not supported by RTF but I
> think it's possible to use various 8-bit character sets and Unicode
> escapes if the proper commands are generated. The Microsoft RTF spec
> lists what is possible.
> 
> 

I've written an rtf2xml program 

http://rtf2xml.sourceforge.net/

and I can state quite definitively that this is correct. RTF must be
7-bit encoded, but can easily handle Unicode by escapes. For example

\u197

represents the unicode character &#197;

However, if the unicode character is greater than 65535, you have to
subtract 65536 from it, so that 

\u-1

becomes 

&#65535;

(I'm a bit fuzzy on this last point. I am looking at my code, which
is:  
        if uni_char < 0:
            uni_char +=  65536

I know the code is correct.
)

This brings up another question I've had about the RTF portion of fop.
How much work is being put into this area? Having worked a lot with
RTF, I've become convinced it is so full of contradictions and such a
mess (such as the unicode example above--what could be less intuitive?)
that I wonder if in the future support for this format should be
dropped altogether? I'm sure RTF support is important because of RTF's
universality, but it would seem that developers' time might be better
spend on developing an Open Office format? 

I realize that my suggestion might come across as someone ungrateful
for all the work of the fop team. I don't mean it to be so, and last
night was very please to find out that fop.91beta supports orphan and
widow controls. The lack of this support had forced me to use a
variant of TeX for a thesis, since the graduate school required no
orphans or widows.

Paul

-- 

************************
*Paul Tremblay         *
*phthenry@iglou.com    *
************************

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic