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
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?
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?
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.