1

Topic: English/Vernacular Names in the Dictionary

Hi Chris,

Found an issue yesterday which Rich Burkmar has identified as being an issue with 'some' English Names within the NBN Dictionary.

Many people and items of software use Google Earth as a means of generating mapping of species.  As I am sure you are already aware this involves the production of a .kml file (version of xml) which contains the necessary species information and mapping coordinates.  XML has distinct problems handling ampersands (&) which causes the translation of the .kml file to fail.

Unfortunately there are English Names in the Dictionary which have ampersands within them - the one which found the issue was Small Purple & Gold (Pyrausta aurata).

I was just wondering what your thoughts would be on changing all such entries from '&' to 'and' or some such similar amendation ??  Just a thought.

Cheers.

Steve

Steve J. McWilliam
www.rECOrd-LRC.co.uk
www.stevemcwilliam.co.uk/guitar/

2

Re: English/Vernacular Names in the Dictionary

Any decent software should convert & to & ?

Charlie Barnes
Information Officer
Greater Lincolnshire Nature Partnership

3

Re: English/Vernacular Names in the Dictionary

Hi Steve

You raise a good point and, embarrassingly, the NHM's old UKSI website used to crash whenever someone requested a name with any kind of URL-meaningful character in it ... and it's classic bad programming.

As Charlie says, software that creates XML or HTML should convert meaningful characters in any strings to HTML entities with a function like htmlentities() (PHP) and likewise if they create a URL they needs to run it through a function like urlencode() (PHP) to encode meaningful characters and then urldecode() the strings afterwards when they come to use them.

I really wouldn't like to vet all of our strings for potential problems with HTML/XML or URLs otherwise we'd be constantly changing them as we found other software that didn't handle strings correctly ;)

Best wishes,
Chris R.

Chris Raper, Manager of the UK Species Inventory, Angela Marmont Centre for UK Biodiversity,
Natural History Museum, Cromwell Road, London, SW7 5BD.  (tel: 020 7942 5894)
also Tachinid Recording Scheme (http://tachinidae.org.uk/)

4

Re: English/Vernacular Names in the Dictionary

Hi Chris,

Ok - fine - I will go with your decision and I will approach the programmer about a change.

Cheers and thanks.

Steve

Steve J. McWilliam
www.rECOrd-LRC.co.uk
www.stevemcwilliam.co.uk/guitar/

5

Re: English/Vernacular Names in the Dictionary

Hi Steve

No problem - if you get your strings encoded correctly then it will future-proof them against any meaningful character so it's definitely the way to go. Out of interest which software is creating the KML files (Google Earth?) and how are you getting the ampersanded strings into it?

Cheers
Chris R.

Chris Raper, Manager of the UK Species Inventory, Angela Marmont Centre for UK Biodiversity,
Natural History Museum, Cromwell Road, London, SW7 5BD.  (tel: 020 7942 5894)
also Tachinid Recording Scheme (http://tachinidae.org.uk/)

6

Re: English/Vernacular Names in the Dictionary

Chris,

I have sent you a Forum e-mail detailing the information you requested above.

Cheers.

steve

Steve J. McWilliam
www.rECOrd-LRC.co.uk
www.stevemcwilliam.co.uk/guitar/