Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Heh, I did exactly the same thing! I still remember parts of the specs.

There's a series of header blocks that define global properties of the document, and can be pretty much safely ignored. In the first dozen bytes or so there's a word (i.e. 16 bit value) that contains the offset in the file that is the first byte past the header blocks. I don't remember the offset, nor do I remember the endianness.

After the header blocks it's pretty simple. Characters 0x00-0x7f are emitted as is. There are also fixed-length and variable-length blocks embedded in the stream that you have to deal with. (These correspond to the WordPerfect markup, à la "Reveal Codes").

Fixed length blocks are introduced with a marker byte in the range of 0xc0-0xcf. There follows a fixed amount of characters, followed by a matching 0xc0-0xcf.

Variable-length blocks are a bit trickier. They are introduced with a marker byte in the range of 0xb0-0xbf. The first word after the marker byte encodes the length of the block. At the end of the block you also have a matching 0xb0-0xbf marker byte.

With a hex-viewer you should be able to puzzle it out. It's funny how time changes things. The format used to be documented in several places on the Web. Right now I can't find a single useful/complete definition any more. Hmm, nor do I have my old source code to this application anymore either. Hmmmm.


In reply to Re:x2 (Sorta OT) - Historic Wordperfect Conversion by grinder
in thread (Sorta OT) - Historic Wordperfect Conversion by zakzebrowski

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-19 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found