The general protocol defines the general character of the overall message, and elements which are common to both the envelope and the message content. The message uses standard ASCII characters throughout, and lines are terminated with the carriage return (ASCII 13) character. Fields are all fixed width and left-justified. Leading zeros for numeric fields are used only where explicitly indicated.
Please note that this standard does not necessarily conform to any particular operating system standard for specifying a text file. For example, Unix-based operating systems (including Apple Mac OS X) use line feed (ASCII 10) to terminate text lines and Microsoft Windows uses a combination of carriage return and line feed (ASCII 13 and ASCII 10). Apple Mac operating systems prior to OS X used a single carriage return to terminate text lines. Due to these inconsistencies files containing electronic data interchange messages must always be processed character by character and not rely on specific text processing functions.
The following are standard components of every line transmitted: