Handling of single quote in FITS header

A place to report problems and bugs in SharpCap
Forum rules
‍

If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs

Please also read about Troubleshooting USB Issues before posting.

*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
Post Reply
prookyon
Posts: 2
Joined: Wed Jan 29, 2025 4:13 pm

Handling of single quote in FITS header

#1

Post 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.
User avatar
admin
Site Admin
Posts: 17524
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Handling of single quote in FITS header

#2

Post 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
Post Reply