Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: segyio does not support ASCII headers, even though they are per-spec #583

Open
sebastianvitterso opened this issue Oct 31, 2024 · 0 comments

Comments

@sebastianvitterso
Copy link

According to https://pubs.usgs.gov/of/2001/of01-326/HTML/FILEFORM.HTM (unsure of its official-ness), the text header of a SEG-Y file can either be encoded as EBCDIC or as ASCII. Most of the files we've used seem to have EBCDIC encoding, and segyio correctly handles these files. However, the other day we were greeted by a file with an ASCII header, and we were a bit stumped, as the header text suddenly seemed completely jumbled.
Looking quickly into segyio code, it seems that it always converts EBCDIC to ASCII, without checking that the contents are actually EBCDIC.

Now, the first character of the SEG-Y text header should be C (as in C 1, C 2 etc.), so looking up the numeric value and deciding whether it is EBCDIC or ASCII should be simple enough, it just has to be done.

Hope this is something we can get fixed in the library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant