Hello:I am noticing a problem in a Rich Text field where a carriage return is unexpectedly inserted into the data. I am reading data from a flat text file where each line is separated by a CR. This data is read in via LS, and stored in a string, each line is separated by a Chr(13). When this data is written into a Rich Text Field, I notice that at one or more points, a chr(13) is inserted, even though there is no chr(13) at that point in the original string. The rtitem is newly created, and I’m adding the string to it by using rtitem.appendText, this is called just once.
Does your rich text field has “Allow multiple values” checked?If it’s checked, check what is the delimiter allowed. most probably, it also allows “,” (comma) and “;” (semicolon), and thus the record is treated as a new value in the text list.
I forget who’s blog or posting I read this on, probably Ben Langhinrich’s or Andre Guirard, and I’m not quoting, but internally, Rich text is stored in paragraphs and if a block of text exceeds the maximum paragraph length, it is broken by the insertion of a CR.
The only good way I know of to “avoid” this is to insert CRs at regular intervals below the maximum paragraph size.
I’m sure if you search for paragraph and Ben Langhinrichs you’ll find more info…that guy probably knows more about richtext than many IBM/Lotus employees.
Thanks for your response. I did find a series of articles on Ben’s blog and they are very useful. Strangely enough, my problem may related to my version of the client - I moved from 6.54 to 7 and the problem seems to have been resolved. I will need to test further, but your pointer to Ben’s blog has been a great help.