Jump to content

Parsing RTF: space problems


tox_yray

Recommended Posts

Hi,

I have a little problem converting Word generated RTF document to HTML via PHP:

Here is a part of a test file:
[code]{\insrsid14898988 \par Ceci, il n\rquote y en a }{\insrsid13044712 p}{\insrsid14898988 as.\par }[/code]
should output: Ceci, il n'y en a pas.
outputs: Ceci, il n'y en a p as.

Reason: "pas" is splitted because it was modified from "Pas" to "pas" from a save to another and there is a space between "insrsid" and "as" that ISN'T MEANT to be there.

Now here is another part:
[code]{\insrsid12341801 avec sans barque}{\insrsid6517974 okok}[/code]
should output: avec sans barque okok
outputs: avec sans barque okok

Reason: Just normal behavior. The space between "insrsid" ans "okok" is MEANT to be there.


Now, my question is, has anyone worked with RTF enough to know a way of telling whether that space should be in the output? Anyone knows how Microsoft Word processes it (that might help me process it myself)?

Thanks a whole lot for any input,
Bruno M-A.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.