Surplus whitespaces appearing

  • Hi guys,

    I've taken over a program that uses the WPTools Rich Text editor. Recently I have encountered an issue with the resultant RTF data on a client site that I was hoping someone could shed some light on. When changes are made to the previously saved text, whitespace appears around the altered text. Have done a lot of searching through this forum and the manuals but haven't found anything to highlight the difference.

    I.e., if I change a typo, like "dodrs" to "doors" the net result when I save and reopen the text is "do o rs". It is only happening with the text that has been saved on this site, so I've tried to trawl through the marked-up version of the text to see if I can find out what is causing it to go haywire. However, there is a bunch of stuff I can't find answers for around some of the elements.

    Code
    --- This is a sample of the problem text as plain text.  I will be trying to fix the typo'd "additionl" to be "additional"6164 Key pad console upgrade.To install a Model 6164 key pad in lieu of the 6148. This key pad is larger in size with larger keys and graphic display. The key pad as full alpha numeric read out making it even easier to use. There are an additionl 4 zones on board for future use and a relay out put for switching devices such as ro st er do o rs from a remote control.--- Marked up version of the above.'<!WPTools_Format V=610/>'#$D#$A'<GlobalPageFormat wpcss="landscape:0;paperw:11906;paperh:16838;margr:0;margl:0;margt:0;margb:0;marg_header:254;marg_footer:254;deftabstop:720;marginmirror:0;"/><StandardFont wpcss="CharFont:'Arial';CharFontSize:1000;"/>'#$D#$A'<variables>'#$D#$A'<variable name="Generator" data="ansi" text="WPTools_6.060;"/></variables>'#$D#$A'<numberstyles></numberstyles>'#$D#$A'<stylesheet></stylesheet><cs nr=1 wpsty=[[CharCharset:1;CharStyleMask:1;CharStyleON:0;]]/><div cs=1><cs nr=2 wpsty=[[CharCharset:1;CharStyleMask:1;CharStyleON:1;]]/><c nr=2/>6164 Key pad console upgrade<cs nr=3 wpsty=[[CharCharset:1;CharStyleMask:1;CharStyleON:0;]]/><c nr=3/>.</div>'#$D#$A'<cs nr=4 wpsty=[[CharCharset:1;]]/><div cs=4><c nr=4/>To install a Model 6164 key pad in lieu of the 6148. This key pad is larger in size with larger keys and graphic display. The key pad as full alpha numeric read out making it even easier to use. There are an additionl 4 zones on board for future use and a relay out put for switching devices such as ro st er do o rs from a remote control.</div>'#$D#$A'<div cs=4></div>'#$D#$A--- This is after the edit, before saving as RTF to the DB, showing the elements surrounding the inserted "a".  "addition<cs nr=5 wpsty=[[CharCharset:0;]]/><c nr=5/>a<c nr=4/>l"'<!WPTools_Format V=610/>'#$D#$A'<GlobalPageFormat wpcss="landscape:0;paperw:11906;paperh:16838;margr:0;margl:0;margt:0;margb:0;marg_header:254;marg_footer:254;deftabstop:720;marginmirror:0;"/><StandardFont wpcss="CharFont:'Arial';CharFontSize:1000;"/>'#$D#$A'<variables>'#$D#$A'<variable name="Generator" data="ansi" text="WPTools_6.060;"/></variables>'#$D#$A'<numberstyles></numberstyles>'#$D#$A'<stylesheet></stylesheet><cs nr=1 wpsty=[[CharCharset:1;CharStyleMask:1;CharStyleON:0;]]/><div cs=1><cs nr=2 wpsty=[[CharCharset:1;CharStyleMask:1;CharStyleON:1;]]/><c nr=2/>6164 Key pad console upgrade<cs nr=3 wpsty=[[CharCharset:1;CharStyleMask:1;CharStyleON:0;]]/><c nr=3/>.</div>'#$D#$A'<cs nr=4 wpsty=[[CharCharset:1;]]/><div cs=4><c nr=4/>To install a Model 6164 key pad in lieu of the 6148. This key pad is larger in size with larger keys and graphic display. The key pad as full alpha numeric read out making it even easier to use. There are an addition<cs nr=5 wpsty=[[CharCharset:0;]]/><c nr=5/>a<c nr=4/>l 4 zones on board for future use and a relay out put for switching devices such as ro st er do o rs from a remote control.</div>'#$D#$A'<div cs=4></div>'#$D#$A--- This is what I get when I reload the text into the editor again, note the "addition a l" result.'<!WPTools_Format V=610/>'#$D#$A'<GlobalPageFormat wpcss="landscape:0;paperw:11906;paperh:16838;margr:0;margl:0;margt:0;margb:0;marg_header:254;marg_footer:254;deftabstop:720;marginmirror:0;"/><StandardFont wpcss="CharFont:'Arial';CharFontSize:1000;"/>'#$D#$A'<variables>'#$D#$A'<variable name="Generator" data="ansi" text="WPTools_6.060;"/></variables>'#$D#$A'<numberstyles></numberstyles>'#$D#$A'<stylesheet></stylesheet><cs nr=1 wpsty=[[CharCharset:1;CharStyleMask:1;CharStyleON:0;]]/><div cs=1><cs nr=2 wpsty=[[CharCharset:1;CharStyleMask:1;CharStyleON:1;]]/><c nr=2/>6164 Key pad console upgrade<cs nr=3 wpsty=[[CharCharset:1;CharStyleMask:1;CharStyleON:0;]]/><c nr=3/>.</div>'#$D#$A'<cs nr=4 wpsty=[[CharCharset:1;]]/><div cs=4><c nr=4/>To install a Model 6164 key pad in lieu of the 6148. This key pad is larger in size with larger keys and graphic display. The key pad as full alpha numeric read out making it even easier to use. There are an addition a l 4 zones on board for future use and a relay out put for switching devices such as ro st er do o rs from a remote control.</div>'#$D#$A'<div cs=4></div>'#$D#$A--- The RTF as it sits in the database{\rtf1\ansi\deff0\uc1\ansicpg1252\deftab720{\fonttbl{\f0\fnil\fcharset1 Arial;}{\f1\fnil\fcharset2 Wingdings;}{\f2\fnil\fcharset2 Symbol;}}{\colortbl\red0\green0\blue0;\red255\green0\blue0;\red0\green128\blue0;\red0\green0\blue255;\red255\green255\blue0;\red255\green0\blue255;\red128\green0\blue128;\red128\green0\blue0;\red0\green255\blue0;\red0\green255\blue255;\red0\green128\blue128;\red0\green0\blue128;\red255\green255\blue255;\red192\green192\blue192;\red128\green128\blue128;\red0\green0\blue0;}\wpprheadfoot1\paperw11906\paperh16838\margl0\margr0\margt0\margb0\headery254\footery254\endnhere\sectdefaultcl{\*\generator WPTools_6.060;}{\plain\fs20\b 6164 Key pad console upgrade\b0 .\par\plain\fs20 To install a Model 6164 key pad in lieu of the 6148. This key pad is larger in size with larger keys and graphic display. The key pad as full alpha numeric read out making it even easier to use. There are an addition a l 4 zones on board for future use and a relay out put for switching devices such as ro st er do o rs from a remote control.\par\pard\plain\plain\fs20\par}}


    By comparison, when done with text not from this site.

    Would appreciate any light that might be shed as to what might be causing whitespace to appear in the text and the difference between the nr=1/2 and nr=4/5 tags.

    Many thanks in advance!
    Nathan