Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic DOORS (steve huntington)
Decrease font size
Increase font size
Topic Title: Replacing Soft Carriage Returns
Topic Summary:
Created On: 13-May-2004 09:38
Status: Post and Reply
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Quick Reply Quick Reply
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Louie Landale, on Friday, March 11, 2005 5:05 PM

Answer:
If you view all characters in MS-Word, soft-CRs look like down-arrows curved to the left. Hard-CRs look like double-stemmed capital Ps, a little like: "lP". Once in MS-Word you can do a global replace of "^l" to "^p", soft to hard (that first one is a small-case L).

- Louie
 13-May-2004 09:38
User is offline View Users Profile Print this message


Dave McMahon

Posts: 22
Joined: 28-Jul-2003

Hi,
We have written a program that exports various attributes in string form for use in an Access Database.
Sometimes the Access database will refuse to import the exported string.
Examination shows the problem strings all contain Soft Carriage Returns.
It is summised that the Object Text may have been cut and pasted (Soft carriage and all) into the Object from MSWORD.

As anyone got a handy routine for replacing Soft Carriage Reutrns with Hard ones within Object text?

Dave McMahon
Tornado Systems Engineering
Ultra Electronics Datel
Report this to a Moderator Report this to a Moderator
 13-May-2004 16:34
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

When you import from MS-Word, a hard CR ("Enter") delimits the objects whereas a soft CR (shft-Enter) is inserted into the object as a hard CR. So if you import and then export all the original soft-returns are turned into hard ones. If you try to insert a soft-CR into DOORS it goes in as a hard CR.

Did some failed experiments years ago and, IIRC, there are several ASCII valid characters that DOORS does not recognize. It doesn't understand soft-CR. Don't know but suspect it only looks at 7 of the 8 bits in the character byte.

I think I entered some test data then printed the ASCII equivalents:

string Text = o."Object Text"
int Len = length(Text), Ascii, i
for (i=0; i<Len; i++)
{ Ascii = intOf(Text)
print i "\t" Text "\t" Ascii "\n"
}

- Louie
Report this to a Moderator Report this to a Moderator
 14-May-2004 07:21
User is offline View Users Profile Print this message


Dave McMahon

Posts: 22
Joined: 28-Jul-2003

Intresting,
We suspected the soft carriage returns, because when we exported the object ino an RTF format file the soft carriage returns were visible!!
Report this to a Moderator Report this to a Moderator
 31-Jan-2005 14:38
User is offline View Users Profile Print this message


simon taylor

Posts: 3
Joined: 27-Sep-2004

I'm having similar problem here. I have been using DOORS 7 for a while. Today I export to Word in the usual way and found that all my Object Text as "soft" CRs. I looked back on archives of previous exports, from the same DOORS versions, and found that "hard" CRs were present. The only difference is I'm now running on XP and not 2K. I'm not sure if DOORS has been patched since, as well.

I wonder if this is to do with the operating system the database is hosted on. Still, I do so want a good old "hard" CR. If you found the solution, please post.

Ta

Simon
Report this to a Moderator Report this to a Moderator
 31-Jan-2005 19:33
User is offline View Users Profile Print this message


Louie Landale

Posts: 2070
Joined: 12-Sep-2002

Answer Answer
If you view all characters in MS-Word, soft-CRs look like down-arrows curved to the left. Hard-CRs look like double-stemmed capital Ps, a little like: "lP". Once in MS-Word you can do a global replace of "^l" to "^p", soft to hard (that first one is a small-case L).

- Louie
Report this to a Moderator Report this to a Moderator
 1-Feb-2005 22:36
User is offline View Users Profile Print this message


Paul Miller

Posts: 376
Joined: 2-Oct-2002

Hi All,

Have been down this path before - you'll to get a handle on the Rich Text Format (RTF) standard.

Click here for link to the RTF std at microsoft.com

If you can work out what the RTF control word is for a soft return, you can use the DXL richText() function to pump the object text and all of it's hidden RTF control words into a buffer, print it out so that you can see what it looks like (can be quite hideous) and use regular expressions to find and replace the unwanted RTF control word.


-------------------------
Paul Miller
Specification Practices Specialist,
EuroCyber,
Melbourne, Australia.
Mobile: +61 (0)418 135 103
Web Site: http://www.eurocyber.biz
E-mail: miller@eurocyber.biz">pmiller@eurocyber.biz
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic DOORS forum.
There are currently 1 users logged in.
The most users ever online was 15 on 15-Jan-2009 at 16:36.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.