Starlink / starlink

Starlink Software Collection
162 stars 53 forks source link

Illegal byte sequence #2

Closed timj closed 11 years ago

timj commented 11 years ago

At some point in the past year the Starlink documentation has ended up with a strange byte sequence in it. Every time SUN95 is updated and the index rebuilt I get this error:

Updating index file for document: sun95
sed: RE error: illegal byte sequence

I only see this in OS X (Mountain Lion - not tested on older systems but it may be that the problem has been around for a long time and only just results in an error on Mountain Lion) and not on Linux. I am assuming sed has got cleverer recently and realises if a non-ASCII character is seen.

Filing this as a reminder.

timj commented 11 years ago

The illegal character turned up in commit e288d430859d07bb562a82d97207c54ebbe53c2e and can be found in one of the examples for the REGRID command.

     This transforms the NDF called a119 into an NDF called a119s.
     It uses nearest-neighbour resampling.  The shape of a119s
     is forced to be (1:256,<C2>$-$20:172) regardless of the location
     of the transformed pixels of a119.
timj commented 11 years ago

@MalcolmCurrie I've run prolat on regrid.f and it converts without any illegal byte sequences. It also converts without converting the minus sign to a LaTeX $-$ construct so I'm guessing that the dollars were added manually and some weird bytes ended up in the file back in 2005. It seems like I can fix this simply by editing sun95.tex and the problem won't reoccur.

MalcolmCurrie commented 11 years ago

@MalcolmCurrie I've run prolat on regrid.f and it converts without any illegal byte sequences. It also converts without converting the minus sign to a LaTeX $-$ construct so I'm guessing that the dollars were added manual and some weird bytes ended up in the file back in

  1. It seems like I can fix this simply by editing sun95.tex and the problem won't reoccur.

It was presumably some typing snafu.

SUN/95 is hand crafted. Without it you'd lose hundreds if not thousands of links explaining the meaning of terms and cross-linking to other related software amongst others. We never saw the issue being on Linux.

Malcolm

Scanned by iCritical.

timj commented 11 years ago

Yes, it seems that BSD sed cares about the setting of the locale. Since the character was invalid for the C locale it complained. Maybe Gnu sed doesn't worry about it or maybe the older Red Hat systems don't have a new enough sed. Either way it was definitely a bug and not something specific to OS X.