vEdit can easily edit both text files and binary/data files:

Text Files
Program source code file or the chapter of a book are typical text files
Binary/Data Files
Executable files (.EXE) and database files (.DBF) are typical binary/data files.

With vEdit the file type is mostly a matter of the “newline” character(s) used in the file.

Windows/DOS and UNIX text files
vEdit expects Line-Feed characters to end each text line
Mac text files
Carriage-Return characters end each text line.

If the Line-Feed characters in a text file are preceded with Carriage-Return characters, vEdit considers the file to be a Windows/DOS text file; otherwise, it’s a UNIX text file. If only Carriage-Return characters are found, it’s a Mac text file.

If no or very few “newlines” are found, e.g. the lines are more than 4096 characters long, vEdit considers the file to be a binary/data file.

The difference between Windows/DOS, UNIX and Mac text files is important in the way that “newline” characters are displayed, deleted and inserted.

When opening a file for editing, vEdit examines the file to automatically determine the file type.

It is possible vEdit will choose the wrong file type, For example: Since a typical executable file (.EXE) contains random Line-Feed characters, vEdit will usually open it as a ("strange looking") text file. If you disable Config > File handling > Enable auto-file type, vEdit will not automatically determine the file type when it opens a file.

Binary/Data files are displayed with a uniform number of characters per line. This also handles “fixed-length record” data files. For these files, Config > File handling > File Type sets the number of characters displayed per line, i.e. the “record length”. “64” is the default for binary files; you may want to change it to “16” when editing in hexadecimal.

Handling File Type Settings

With Config > File handling > File Type you can see and/or change the current file's type. Each file opened can Have its own setting:

0 = CR-LF
Typical for Windows/DOS, Each text line ends in a CR (Carriage-Return) and LF (Line-Feed). The LF is the true “Newline”; the CR is optional.
1 = LF
Typical for UNIX, Each text line ends in just a LF.
2 = CR
Typical for Macintosh, Each text line ends in just a CR.
3 = CR+LF
Each text line ends in both a CR (Carriage-Return) and LF (Line-Feed). Unlike type “0”, both the CR and LF must be present. This special mode can be manually selected when editing binary data files where each record ends in both a CR and LF. (Unlike type “0”, a binary field with a LF will not split the displayed line.)
4 = 25 Hex
Each EBCDIC text line ends in an EBCDIC “Line-Feed” which has a hex value of 25. This special mode can be manually selected.
n = Record Mode
Values of “8” through “65535” set the record length for fixed-length-record data files. Instead of assuming that lines end in a “newline” character, VEDIT treats each line (record) as simply ‘n’ characters. Word processing operations are not available in Record mode.

EDIT > Convert > Convert macro can convert a file with fixed- length records into a normal text file with “newline” characters.

Binary / Data and Text File Types

Related Resources