File formats

From Team Developer SqlWindows Wiki
Jump to: navigation, search

IDE file formats


Contents


Pointer2.png How to Save an APL or APP File in Text Format Pointer.png


Here is how:


1 – Open TD and read in your xxx.APL or xxx.APP file
2 – Click menu File/Save As…
3 – Select Save as type: “Text (*.apt)”
4 – In the ‘File name:’ field be sure to type in the entire file name *and* include the extension “.APL” for libraries or 
".APT" for application sources
5 - Click Save.


Now TD will save the file as xxx.APL and it will be in text format.


Here is why: If there is no extension added to the File name, then TD will add in the default extension when saving; in this case “.apt”.
But, if there is an extension added to the file name, then TD will use that extension when saving the file.

Note, the same method is used for an APP file (defaults to binary format) it you want to save it in text format.
Follow the steps above and be sure your file is named xxx.APP. Select Save as type: “text (*.apt)” and save the file.

(Does it matter whether you select “Text (*.apt)” or “Indented Text (*.apt)” ?? Not really, though it is preferred to use plain (not indented) text.
Easier to read, copy/paste and edit are easier if needed, and if you need to use one of the TD Utilities: http://www.jeffluther.net/unify/#Utilities they assume non-indented text format.)


So, when we suggest that you save all your code in text format -- your main APP + your APLs -- this is how to do that while keeping the correct extensions.
Note too that TD's APLs are in binary format. You don't need to convert them to text. It is your code that we suggest be saved in text format.


Last: How do you know if a file is in text or binary format? I use Notepad or Notepad++ (http://notepad-plus-plus.org/) and read in the file.
If it begins with "MGDR" and displays non-text data, it's binary. Otherwise, you'll see readable text.


LARGE APPLICATIONS: be aware that if you have a large app. with many APLs, saving your code in text format has the side-effect that read-in time can take longer.
You will need to weigh the time waiting for read-in vs. the the added security of having your code in text format.


Pointer2.png TD 5.x/6.x text file format Pointer.png

It seems that the TD 5.x/6.x text file format is:

  • First line is encoded in UTF-16
  • All other lines are encoded in UTF-16BE (yes, that is BIG endian and yes, that is actually the same as the first line but without the byte order mark)
  • The end of lines (carriage return + linefeeds) are UNencoded