program unesc character*132 line open(unit=1,file='wish.lst_097',status='old') open(unit=2,file='wish.lst_fix',status='new', 1 carriagecontrol='list') 1 format(a132) 2 format(a) 5 read(1,1) line do i=1,128 if (ichar(line(i:i)).eq.27) then line(i:)=line(i+4:) end if if (ichar(line(i:i)).eq.12) then line(i:)=line(i+1:) end if end do do l=132,1,-1 if (line(l:l).ne.' ') go to 10 end do 10 write(2,2) line(1:l) go to 5 end