Warp's default editor E.exe appends EOF (26d) byte: Difference between revisions

From OS2World.Com Wiki
Jump to navigation Jump to search
Created page with "by Al Savage The default system text editor is x:\OS2\E.exe . It likes to append an End-of-file character byte (EOF = ASCII 26d, 1Ah, <Ctrl-Z>) when it saves a file. Th..."
 
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
by [[Al Savage]]
{{Article
|Author=[[Al Savage]]
|Date=
|OS=OS/2 Warp 4
|File=N/A
|Source=N/A
}}


The default system text editor is x:\OS2\E.exe . It likes to append an End-of-file character byte (EOF = ASCII 26d, 1Ah, <Ctrl-Z>) when it saves a file. This is historically correct, and many older utilities that were designed to be used to manipulate text files depend on the file ending with an EOF byte.
The default system text editor is x:\OS2\E.exe. It likes to append an End-of-file character byte (EOF = ASCII 26d, 1Ah, <Ctrl-Z>) when it saves a file. This is historically correct, and many older utilities that were designed to be used to manipulate text files depend on the file ending with an EOF byte.


The problem:
The problem:
Some web browsers do not like an HTML file to end with a EOF byte. Technically, the browsers are broken, but it doesn't do any good to point fingers and jump up and down. The offending browsers (NS Navigator 4.x for Win, and IE for Win) will display a "box" at the end of the page when they encounter the EOF byte. Note that NS 4.61 for OS/2 does not have this problem!
Some web browsers do not like an HTML file to end with a EOF byte. Technically, the browsers are broken, but it doesn't do any good to point fingers and jump up and down. The offending browsers (NS Navigator 4.x for Win, and IE for Win) will display a "box" at the end of the page when they encounter the EOF byte. Note that NS 4.61 for OS/2 does not have this problem!


Back when I used to try to use E.exe to edit HTML files, I'd have to go back and edit the file with some other utility and resave it to get rid of that box. It used to drive me nuts, but I never really tried to pin down what was causing it. Then I switched to the MED editor and I hadn't thought about this for a while, until the topic came up recently in conversation with someone else who figured out the cause.
Back when I used to try to use E.exe to edit HTML files, I'd have to go back and edit the file with some other utility and resave it to get rid of that box. It used to drive me nuts, but I never really tried to pin down what was causing it. Then I switched to the MED editor and I hadn't thought about this for a while, until the topic came up recently in conversation with someone else who figured out the cause.


Here's a test file:
Here's a test file: http://asavage.dyndns.org/OS2/Warp4Install/BoxOnEnd.html
http://asavage.dyndns.org/OS2/Warp4Install/BoxOnEnd.html
created with E.exe, and containing the EOF marker (1Ah).
created with E.exe, and containing the EOF marker (1Ah).
Screenshot:
Screenshot:
http://asavage.dyndns.org/OS2/Warp4Install/BoxAtEnd02.png (7k)
[[image:BoxAtEnd02.png]]


It looks just fine if viewed via NS 4.61 for OS/2.
It looks just fine if viewed via NS 4.61 for OS/2.
But, if viewed with NS 4.76 for Windoze, it shows the box char at the end.
But, if viewed with NS 4.76 for Windoze, it shows the box char at the end.
Screenshot:
Screenshot:
http://asavage.dyndns.org/OS2/Warp4Install/BoxAtEnd01.png (9k)
[[image:BoxAtEnd01.png]]


To further confuse the issue, if this file is served by an ftp server, it is rendered OK again by NS 4.76/Win.
To further confuse the issue, if this file is served by an ftp server, it is rendered OK again by NS 4.76/Win.
Test URL:
Test URL:
ftp://asavage.dyndns.org/OS2/BoxOnEnd.html
ftp://asavage.dyndns.org/OS2/BoxOnEnd.html
Line 26: Line 34:


Felix Miata compiled this table:
Felix Miata compiled this table:
 
{|class="wikitable"
  Appends 1Ah                   Yes     No
!Appends 1Ah||Yes||No
  ----------------------------------------
|-
  PC DOS 6.1 EDLIN.COM         X
|PC DOS 6.1 EDLIN.COM||X||
  PC DOS 2000 E.EXE             X
|-
  OS/2 E.EXE                   X
|PC DOS 2000 E.EXE||X||
  OS/2 EPM.EXE                         X
|-
  OS/2 TEDIT.EXE                       X
|OS/2 E.EXE||X||
  Norton Commander Internal             X
|-
  M$ DOS 6.22 EDIT.COM                 X
|OS/2 EPM.EXE|| ||X
  Freeware TED.COM                     X
|-
  WordPerfect 6.2 for DOS               X
|OS/2 TEDIT.EXE|| ||X
  Composer 4.61 for OS/2               X
|-
        Totals                 3       7
|Norton Commander Internal|| ||X
|-
|M$ DOS 6.22 EDIT.COM|| ||X
|-
|Freeware TED.COM|| ||X
|-
|WordPerfect 6.2 for DOS|| ||X
|-
|Composer 4.61 for OS/2|| ||X
|-
!Totals||3||7
|}


==The 'Fix'==
==The 'Fix'==
Line 50: Line 69:
==Revision History:==
==Revision History:==
30Apr2013
30Apr2013
    Fixed up HTML to validate properly; no content change.
* Fixed up HTML to validate properly; no content change.
05-Jun-01
05-Jun-01
    Initial release.
* Initial release.
18-Oct-01
18-Oct-01
    Changed link to Paul's server, so that MCP version could be seen.
* Changed link to Paul's server, so that MCP version could be seen.
06-Nov-01
06-Nov-01
    Repaired link to BoxAtEnd01.png
* Repaired link to BoxAtEnd01.png
 
[[Category:Software Articles‎]]

Latest revision as of 22:34, 22 March 2024

Article Info
Author Al Savage
Date
OS Version OS/2 Warp 4
Companion File N/A
Source N/A


The default system text editor is x:\OS2\E.exe. It likes to append an End-of-file character byte (EOF = ASCII 26d, 1Ah, <Ctrl-Z>) when it saves a file. This is historically correct, and many older utilities that were designed to be used to manipulate text files depend on the file ending with an EOF byte.

The problem: Some web browsers do not like an HTML file to end with a EOF byte. Technically, the browsers are broken, but it doesn't do any good to point fingers and jump up and down. The offending browsers (NS Navigator 4.x for Win, and IE for Win) will display a "box" at the end of the page when they encounter the EOF byte. Note that NS 4.61 for OS/2 does not have this problem!

Back when I used to try to use E.exe to edit HTML files, I'd have to go back and edit the file with some other utility and resave it to get rid of that box. It used to drive me nuts, but I never really tried to pin down what was causing it. Then I switched to the MED editor and I hadn't thought about this for a while, until the topic came up recently in conversation with someone else who figured out the cause.

Here's a test file: http://asavage.dyndns.org/OS2/Warp4Install/BoxOnEnd.html created with E.exe, and containing the EOF marker (1Ah).

Screenshot:

It looks just fine if viewed via NS 4.61 for OS/2. But, if viewed with NS 4.76 for Windoze, it shows the box char at the end.

Screenshot:

To further confuse the issue, if this file is served by an ftp server, it is rendered OK again by NS 4.76/Win.

Test URL: ftp://asavage.dyndns.org/OS2/BoxOnEnd.html

So it's only a problem if an HTML file is served via http and rendered by the Win version of NS.

Felix Miata compiled this table:

Appends 1Ah Yes No
PC DOS 6.1 EDLIN.COM X
PC DOS 2000 E.EXE X
OS/2 E.EXE X
OS/2 EPM.EXE X
OS/2 TEDIT.EXE X
Norton Commander Internal X
M$ DOS 6.22 EDIT.COM X
Freeware TED.COM X
WordPerfect 6.2 for DOS X
Composer 4.61 for OS/2 X
Totals 3 7

The 'Fix'

A modified version of E.exe can eliminate this problem, if you don't use any EOF-sensitive textfile manipulation apps. Get e.exe (from Al's server) (from Paul's server) and unzip it. Rename x:\OS2\E.exe, then copy the new one there.

There is also a modified version of the e.exe that ships with MCP FP1 (XR_C001) at Paul's server.

Revision History:

30Apr2013

  • Fixed up HTML to validate properly; no content change.

05-Jun-01

  • Initial release.

18-Oct-01

  • Changed link to Paul's server, so that MCP version could be seen.

06-Nov-01

  • Repaired link to BoxAtEnd01.png