Inquiry : Save-as "Indented Text" corrupts file

Discussion forum about all things Gupta, OpenText and the community.
Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3392
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Inquiry : Save-as "Indented Text" corrupts file

Post by Dave Rabelink » 18 Sep 2013, 16:23

I save all my sources normally as TEXT format. I did not encounter any issues with it.

A drawback of using TEXT vs INDENTED TEXT is that when using a code review tool (like code collaborator) it shows the changes
of the files (a diff) using the .HEAD format.

For example:

Changed file, saved as TEXT and compared using WinMerge:
WinMerge_TEXT.png
Same changed file, but now saved as INDENTED TEXT:
WinMerge_INDENTEDTEXT.png

When comparing revisions and do code reviews, the INDENTED TEXT format is better.
The indentation really helps to read the code better, instead of the HEAD levels.

So, we converted all TD61 project sources to INDENTED TEXT to make the code reviews more efficient.

But we have seen that on an old TD project (TD 151), we get file corruptions.
So a file saved as TEXT and then saved as INDENTED TEXT will result in loosing source code !

It seems to be in specific cases only. I have created a simple textfile to show this.
When opening the attached file in TD1.5 up to TD4.2, save it as INDENTED TEXT and reopen it will show the corruption.

I tested the same file on TD61 and TD62, and there is no corruption. Probably the change to UNICODE has changed te way TD saves sources and fixes the issue.
Or does it?

I'm not confident anymore in the INDENTED TEXT format. Now seeing issues on older TD versions, what about certain cases of corruption on the newer TD versions?

So my question here is: what is your experience using INDENTED TEXT. Have you found any issues with it?

Use the testcase to see the corruption.
SaveThisAsIndented.zip
- Open the apt
- Save-as INDENTED TEXT
- reopen the newly saved file and see

On TD15 to TD42, corruption
On TD51 and up, no corruption
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

RainerE
Germany
Posts: 2225
Joined: 27 Apr 2021, 12:40
Location: Germany

Re: Inquiry : Save-as "Indented Text" corrupts file

Post by RainerE » 19 Sep 2013, 08:21

Hello,

that indendet text leads to problems is a known problem at least since TD 2.1. I did report this to Gupta in early times, but it was never fixed.

If you have to much indents, there is something missing in the text file.

We have decided not to use indendet text, but text.

Regards,
Rainer

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 3392
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Inquiry : Save-as "Indented Text" corrupts file

Post by Dave Rabelink » 20 Sep 2013, 10:58

I really want to know if my sources are safe using any of the file formats offered in TD.

I dropped normal format due to the fact that IF the file gets corrupted (eg disk errors, whatever), so not even related to TD itself but an "external" factor which could mingle the file, that I'm unable to salvage all or parts from the file. The binary format prevents me from using tools to get parts from it.

The reason for TEXT format for me is that I CAN salvage code when the file is more or less opened in a texteditor when corrupted.
Mostly TD crashes on those files, so source code is actually gone.

I did not find specific issues with TEXT format, except when using ActiveX generated libraries.
See : https://wiki.tdcommunity.net/index.php/ ... ext_format
Acknowledged by Gupta with defect number : TD-18402

But this issue is "manageable". The ActiveX library (when corrupted) could be regenerated to get it all back.
(except when you have custom code in those files, which is therefore not recommended)

INDENTED TEXT format has the same benefit when corrupted. But the issue found on TD15 to TD42 makes me not to advice to use this format on those TD versions.

Was there a defect or set of defects related to INDENTED TEXT issues, known by Gupta, which are addressed with the release of TD5.1?
If so, there probably are test sources to check if the fix worked. This makes me more confident that issues are specifically fixed and that INDENTED TEXT is safe to use.
But if Gupta did not fix those issues specifically, the change from ANSI to UNICODE could have unintentionally fixed issues. But maybe not all.

So Gupta can check in the history of fixes if this issue was known and if it has been addressed.
If not, I would not recommend using INDENTED TEXT and always use TEXT format in both the old and new TD versions.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

User avatar
Charlie
Canada
Posts: 649
Joined: 07 Mar 2017, 18:52
Location: Fredericton, New Brunswick, Canada

Re: Inquiry : Save-as "Indented Text" corrupts file

Post by Charlie » 23 Sep 2013, 11:55

Although I can't remember the details now, seems to me I had issues with saving app's/apl's as "indented text" as far back as SQLWindows 5 (16-bit, circa 1995) .

To me, it would have been best, all these years, if SQLWindows (Team Developer) only saved as text. All other options have always felt buggy.

FRBhote
India
Posts: 2212
Joined: 09 Mar 2017, 05:32
Location: Hyderabad, India

Re: Inquiry : Save-as "Indented Text" corrupts file

Post by FRBhote » 24 Sep 2013, 06:01

Once every couple of days I save as Text and then use it as APP normally - saves a lot of time and I have a backup too.

Igor Ivanovic
Site Admin
Site Admin
Croatia
Posts: 1462
Joined: 05 Mar 2017, 12:37
Location: Zagreb, Croatia

Re: Inquiry : Save-as "Indented Text" corrupts file

Post by Igor Ivanovic » 27 Sep 2013, 14:15

In the past I had all sort of problems with Normal and indented text, so for years now I'm using text only.
Igor Ivanovic
Image

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 3 guests