WPCubed Product Support

RTF Error

Hi Julian,

I recently recieved certain set of files which upon display in WP showed some extra characters towards the end of the file. Upon investigating I noticed few stray characters at the end of file. Here is an example

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fswiss\fcharset0 Arial;}}
\viewkind4\uc1\pard\f0\fs20 Sample\par
}f

Now, all the other RTF editors seem to omit these characters, except for WP. I am not sure what the RTF standard says for this. Is it a bug? If not then can we detect such instances in WP and omit them programatically, except for RAW file corrections?

#1 ♥ 0
3.9k Views 2 users read 2 min
support

Hi,

I would recomend to do a backward scan for '}' befor loading the document. You can replace all chars until the last '}' with \0 to fix that problem. It would be possible to do that in the RTF reader itself but I think it can have sideffects. How often do you have this documents and how were they created?

Julian

#2 ♥ 0

I am not sure how and by which application does these RTF files are created, as these are files received from a client. The current shipment contained about 100 odd files with this error, I might get the same errors in future as well. Though I have number of applications based on WP, I would have to replicate the same fix in all of those or create a separate application to fix that 🙁 .

#3 ♥ 0
This category is archived. No new posts are possible.