m |
|||
| Line 1: | Line 1: | ||
<seo title="Converting Files | vEdit" description="Learn now to convert between Windows/DOS, UNIX/Linux and Mac text files using vEdit."></seo> | <seo title="Converting Files | vEdit" description="Learn now to convert between Windows/DOS, UNIX/Linux and Mac text files using vEdit."></seo> | ||
{{DISPLAYTITLE:Convert between Windows, Linux and Mac files}} | {{DISPLAYTITLE:Convert between Windows, Linux and Mac files}} | ||
| + | |||
| + | This article shows how to convert between different file types and perform other useful conversions. | ||
| + | |||
| + | �*Converting between Windows/DOS, UNIX/Linux and Macintosh text files. | ||
| + | �*Converting from fixed-length records into normal text files. | ||
| + | �*Converting a text file into fixed-length records. | ||
| + | �*Padding a text file to make all lines the same length. | ||
| + | �*Stripping trailing spaces from a text file. | ||
| + | |||
| + | ==Converting Between Files Types== | ||
| + | |||
| + | vEdit supports Windows/DOS, UNIX/Linux and Mac text files. Main differences between them are the “newline” characters used at the end of each line. vEdit also supports data files with fixed-length records. | ||
| + | |||
| + | When opening a file, vEdit automatically determines the most likely file type. It can usually determine the correct file type for text files (Windows/DOS, UNIX/Linux or Mac). It is highly recommended confirming the file type before doing file converting. | ||
| + | |||
| + | ====Confirm File Type==== | ||
| + | |||
| + | 1. Move the cursor to the end of a line | ||
| + | 2. Press <kbd>Alt-D</kbd> (the hot-key for <kbd>View</kbd> > <kbd>Toggle display mode</kbd>) | ||
| + | |||
| + | You can now see the hex codes for the “newline” characters, if any. “'''0D'''” is the hex code for Carriage-Return. “'''0A'''” is the hex code for Line-Feed. | ||
| + | |||
| + | ;Windows / DOS | ||
| + | :If each line ends in “'''0D 0A'''”, you have a Windows/DOS text file. | ||
| + | ;Linux / UNIX | ||
| + | :If each line ends in just “'''0A'''”, you have a UNIX text file. | ||
| + | ;Apple Mac | ||
| + | :If each line ends in just “'''0D'''”, you have a Mac text file. | ||
| + | |||
| + | If you '''don't''' see “'''0D'''” or “'''0A'''”, then you must have already explicitly set a record-length with <kbd>CONFIG</kbd> > <kbd>File handling</kbd> > <kbd>File type</kbd>. | ||
| + | |||
| + | 3. Double-check that <kbd>CONFIG</kbd> > <kbd>File handling</kbd> > <kbd>File type</kbd> is set to the correct file type. | ||
| + | |||
| + | ;Windows/DOS | ||
| + | :Windows set to “0” | ||
| + | ;Linux / UNIX | ||
| + | :Linux set to “1” | ||
| + | ;Apple Mac | ||
| + | :Mac set to “2” | ||
| + | Otherwise, it is set to the data file's record length. | ||
This article shows how to convert between different file types and perform other useful conversions.
�*Converting between Windows/DOS, UNIX/Linux and Macintosh text files. �*Converting from fixed-length records into normal text files. �*Converting a text file into fixed-length records. �*Padding a text file to make all lines the same length. �*Stripping trailing spaces from a text file.
vEdit supports Windows/DOS, UNIX/Linux and Mac text files. Main differences between them are the “newline” characters used at the end of each line. vEdit also supports data files with fixed-length records.
When opening a file, vEdit automatically determines the most likely file type. It can usually determine the correct file type for text files (Windows/DOS, UNIX/Linux or Mac). It is highly recommended confirming the file type before doing file converting.
1. Move the cursor to the end of a line 2. Press Alt-D (the hot-key for View > Toggle display mode)
You can now see the hex codes for the “newline” characters, if any. “0D” is the hex code for Carriage-Return. “0A” is the hex code for Line-Feed.
If you don't see “0D” or “0A”, then you must have already explicitly set a record-length with CONFIG > File handling > File type.
3. Double-check that CONFIG > File handling > File type is set to the correct file type.
Otherwise, it is set to the data file's record length.