Page 1 of 1

Handling of single quote in FITS header

Posted: Tue Aug 26, 2025 3:45 pm
by prookyon
If the object name is something that contains a single quote (for example Stephan's Quintet ) then SharpCap currently stores it in FITS header as is:

Code: Select all

OBJECT  = 'Stephan's Quintet'  /
This causes the single quote in the middle to end the value and the rest is treated as comment.
I googled a bit and several documents (for example https://fits.gsfc.nasa.gov/users_guide/ ... ode20.html ) mention that "To include a single quote within a character string, use two successive single quotes"

Code: Select all

OBJECT  = 'Stephan''s Quintet' /
I tested with several applications and at least those that I mostly use will then properly display it. (Though I also saw some that still cut it to "Stephan" and some will show "Stephans Quintet" - but I think still an improvement overall)
Is this something that could be fixed? I guess manual workaround is to just replace the single quotes coming from object databases manually with an apostrophe.

Re: Handling of single quote in FITS header

Posted: Wed Aug 27, 2025 12:47 pm
by admin
Hi,

yes, that can be fixed - it looks like the encoding of a single quote by using two consecutive ones is part of the FITS standard, but the FITS writing library I use is presumably not handling that case. I will either fix the library or work around it ;)

cheers,

Robin