https://bugs.kde.org/show_bug.cgi?id=475765

            Bug ID: 475765
           Summary: FITS viewer truncates header strings (values &
                    comments) at `/` characters
    Classification: Applications
           Product: kstars
           Version: unspecified
          Platform: unspecified
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: mutla...@ikarustech.com
          Reporter: cgo...@duck.com
  Target Milestone: ---

Created attachment 162385
  --> https://bugs.kde.org/attachment.cgi?id=162385&action=edit
Minimal example of FITS header with slash(es)

SUMMARY
When a slash (`/`) character is present in a FITS header value or comment
string, the string is truncated/split at that character.

STEPS TO REPRODUCE
1. Use KStars FITS viewer to open a FITS file that contains slashes in one or
more header comments or value strings (see attachment for example)
2. Open header (i.e. `Ctrl-H`)
3. Note that the comments/values of interest are cut off where the slash should
have been

OBSERVED RESULT
See the screenshot in this GitHub comment:
https://github.com/scriptorron/indi_pylibcamera/pull/49#issuecomment-1766943549

EXPECTED RESULT
I would expect the full comment field (up to the max 80-character-per-card
limit, that is) to be displayed.

SOFTWARE/OS VERSIONS
I am personally able to reproduce this using KStars 3.4.1 on Ubuntu 20.04,
3.6.2 on Linux Mint Debian Edition 6, and 3.6.7 on Windows 10. I do not think
this is an OS-specific thing.

ADDITIONAL INFORMATION
I suspect this is due to a parsing routine that is naïvely splitting the string
on instances of the slash character without taking into account the presence of
quotation marks (in the case of value strings) or the fact that only one slash
(the first occurrence outside a value string) should be used to delimit the
comment.

For reference, the header of the attached example is shown below:
SIMPLE  =                    T / conforms to FITS standard
BITPIX  =                    8 / array data type
NAXIS   =                    0 / number of array dimensions
EXTEND  =                    T
SLASHVAL= 'string w/ a slash'  / no slash here
SLASHCOM= 'no slash here'      / comment w/ a slash

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to