* underscore character or hyphen?

Questions regarding use of any Version of Family Historian. Please ensure you have set your Version of Family Historian in your Profile. If your question fits in one of these subject-specific sub-forums, please ask it there.
Post Reply
User avatar
deepdiver
Gold
Posts: 13
Joined: 15 Apr 2006 17:31
Family Historian: V7
Location: Worcestershire, England, United Kingdom
Contact:

underscore character or hyphen?

Post by deepdiver »

Is an underscore character safer to use in FH in consistency terms than a hyphen?

I want to use a character like a hyphen or an underscore to separate a bunch of numbers in the Picture Note field, in Edit Media Item.

The sort of thing I want to put is either 20190320-111059 or 20190320_111059. This is useful only for me personally and has no meaning relative to the title of the media item, which is described in an ordinary way, such as 'Baptism of Joanna Bloggs 1808.'

(It is actually the exact date and time I took a picture, but I cannot use the date field as FH wants it to be in a set format and does not go down to seconds of time (unsurprisingly!) I need to be able to refer back to my list of specific segments of source documents, for my own research purposes.)

It is not intended to be meaningful to viewers, but I need it to be able to be exported consistently as part of a Gedcom. I have seen from a topic on Hyphenated Surnames that there may be difficulties with a hyphen (en-dash, em-dash etc) depending on fonts etc.

Is the underscore a better choice?

Andrea
Andrea
User avatar
steveflanuk
Diamond
Posts: 54
Joined: 25 May 2015 19:21
Family Historian: V6.2

Re: underscore character or hyphen?

Post by steveflanuk »

Personally I would say an underscore is better - but that is just my preferred way of naming items or files.

If you have a hyphen in your date and time string and, in the future, imported a list of these strings into another program, the hyphen may be mistaken for a minus sign especially when you are just using numbers.
User avatar
deepdiver
Gold
Posts: 13
Joined: 15 Apr 2006 17:31
Family Historian: V7
Location: Worcestershire, England, United Kingdom
Contact:

Re: underscore character or hyphen?

Post by deepdiver »

Thank you, that's very helpful.
Andrea
User avatar
tatewise
Megastar
Posts: 28344
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: underscore character or hyphen?

Post by tatewise »

In GEDCOM terms there is no problem with either the ANSI underscore or hyphen character.
The en-dash, em-dash, etc, you mentioned are not ANSI but UNICODE characters that may not be supported in other products.

Bear in mind that the FH Media Picture Note is NOT a standard GEDCOM field and may not export to other products.
The same goes for the Media Date field.
The Custom Id is a standard GEDCOM field but many products do not support it.
So to ensure your date-time data is included in GEDCOM exports use the Export Gedcom File Plugin.

BTW: There is a way to include time in a Date field by using the Date Phrase format.
It would appear like 20 March 2019 ("11:10:59") for your example date-time.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: underscore character or hyphen?

Post by Mark1834 »

Strictly speaking, the en-dash should be used to denote a span (e.g., John Smith lived in London 1850-1859), but I think it is safer to stick to the simple hyphen for all dashes. Easy enough when entering text directly from the keyboard, but be careful if copying from a word processing package that distinguishes between the various lengths of dash.
Mark Draper
User avatar
David2416
Superstar
Posts: 398
Joined: 12 Nov 2017 16:37
Family Historian: V7
Location: Suffolk UK

Re: underscore character or hyphen?

Post by David2416 »

I prefer the hyphen, rather than underscore, because of the way things sort. Always change the BMD downloads From FMP to hyphens so they sort consistently.
avatar
Gowermick
Megastar
Posts: 1702
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: underscore character or hyphen?

Post by Gowermick »

HaHa,
I do the opposite, because underscores sort before alphanumerics characters. To get a source to sort to the top of a list for easier selection, I add an underscore as a prefix, (this also applies to windows directories).

There are situations where a hyphen can cause problems, (e.g. spreadsheets), so I tend to stick to underscore.
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
avatar
E Wilcock
Megastar
Posts: 1181
Joined: 11 Oct 2014 07:59
Family Historian: V7
Location: London
Contact:

Re: underscore character or hyphen?

Post by E Wilcock »

I am absolutely not an IT expert - but underline can be a problem too. I help friends occasionally and had trouble a couple of years ago when the sole email address (demanded for a mobile phone security check) included an underline. I now avoid underlines which in any case have always been used to indicate Italic.
I use an asterisk to bring queries etc to the top. But it may not be wise to recommend that, as it isnt on my keyboard.
User avatar
tatewise
Megastar
Posts: 28344
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: underscore character or hyphen?

Post by tatewise »

Strange :?
Asterisk (*) is on every keyboard I've seen by using Shft 8.
The symbols on the standard UK keyboard shifted digit keys are ! " £ $ % ^ & * ( )
Do you perhaps have a foreign language keyboard?

FH does not allow asterisk (*) in Query or Plugin names, etc, as asterisk is NOT allowed in file names, so perhaps you mean some other symbol?
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
Gowermick
Megastar
Posts: 1702
Joined: 13 Oct 2015 07:22
Family Historian: V7
Location: Swansea

Re: underscore character or hyphen?

Post by Gowermick »

E Wilcock wrote:I am absolutely not an IT expert - but underline can be a problem too. I help friends occasionally and had trouble a couple of years ago when the sole email address (demanded for a mobile phone security check) included an underline. I now avoid underlines which in any case have always been used to indicate Italic.
I use an asterisk to bring queries etc to the top. But it may not be wise to recommend that, as it isnt on my keyboard.
You will encounter problems in Windows, where * is not allowed in filenames :D
Mike Loney

Website http://www.loney.tribalpages.com
http://www.mickloney.tribalpages.com
User avatar
davidf
Megastar
Posts: 951
Joined: 17 Jan 2009 19:14
Family Historian: V6.2
Location: UK

Re: underscore character or hyphen?

Post by davidf »

One of the problems with Underscores is that if they get incorporated in_a_link, the underlining of the link can obscure the underscore making it look like a space.
I find a tilde (~) is a useful separator or substitute character (for instance in filenames where you cannot use /,\,|,: etc.!)
David
Running FH 6.2.7. Under Wine on Linux (Ubuntu 22.04 LTS + LXDE 11)
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: underscore character or hyphen?

Post by Mark1834 »

Guess there is no ideal solution. For what it’s worth, underscores are probably more common in programming languages, so if you write add-ins you may be more inclined to use them. I also use underscores to denote missing or uncertain characters when transcribing, but the context generally makes the meaning clear.

I used to visit our Hamburg office frequently in the day job, and whenever I used a local docking station it was always with a German keyboard. Not only are many punctuation characters different, but some letters are transposed as well! It was also fun watching foreign support staff struggling with the UK keyboard on remote assistance sessions!
Mark Draper
avatar
E Wilcock
Megastar
Posts: 1181
Joined: 11 Oct 2014 07:59
Family Historian: V7
Location: London
Contact:

Re: underscore character or hyphen?

Post by E Wilcock »

Apologies - I am using a Dell dual language Russian English keyboard, set to English. I thought I had used Shift and 8 which if I do it now produces * an asterisk, just as you say. But what is shown on my 8 key is ^ which is also shown on my query, and again on the numeral 6 key which must have muddled me.
User avatar
jimlad68
Megastar
Posts: 921
Joined: 18 May 2014 21:01
Family Historian: V7
Location: Sheffield, Yorkshire, UK (but from Lancashire)
Contact:

Re: underscore character or hyphen?

Post by jimlad68 »

I went though an exercise finding what were the "safest common" symbols to use in filenames across platforms and came to this limited sad result, I also excluded some symbols that cause probems elsewhere. I found Mapping Cloud Storage as a Local Drive in File Explorer and comparing filenames a big problem.
as at https://www.thewindowsclub.com/map-clou ... ve-windows

These seem safe anywhere:
! @ $ ( ) [ ] ` ' ; _ - = blank (but filename not end in blank)
but blanks are messy with browsers.

Agree with most of the above, "-" spreadsheet, "_" often can't be seen, especially when underlined or as a hyperlink.
Jim Orrell - researching: see - but probably out of date https://gw.geneanet.org/jimlad68
User avatar
deepdiver
Gold
Posts: 13
Joined: 15 Apr 2006 17:31
Family Historian: V7
Location: Worcestershire, England, United Kingdom
Contact:

Re: underscore character or hyphen?

Post by deepdiver »

Thanks to everyone for the very comprehensive answers. Especially since some of you have taken the time to research it fully, in far more detail than I could have done!

I've got lots of ideas as to how to take things forward, now.

BW
Andrea
Post Reply