Embed BCI in your web pages with BCILinks!

3 views
Skip to first unread message

rogerhyam

unread,
Sep 24, 2008, 11:52:32 AM9/24/08
to Biodiversity Collections Index

I just added a simple example of usage of the JSON service to the BCI
site. It allows people with collection names/codes/LSIDs in their web
pages to automatically turn those names/codes/LSIDs into links to BCI
or directly to the resources concerned if they have a web site URL in
their BCI record.

It is documented at the bottom of the JSON webservice page.

http://biocol.org/json#BCILinks

Your thoughts and bug reports are most warmly welcomed.

(There is still one known issue in that it doesn't report errors to
the console as it should - not sure what is going on with the JS
console but will look into it tomorrow - honest - I have a note on my
desk to remind me.)

Cheers,

Roger


rogerhyam

unread,
Sep 25, 2008, 5:48:46 AM9/25/08
to Biodiversity Collections Index
OK - I've fixed the console issue now and added a debug option.

Roger

Peter Desmet

unread,
Nov 13, 2008, 2:16:36 PM11/13/08
to Biodiversity Collections Index
Hi,

This is a really nice service! One suggestion though:

Collection names with special characters (é, à, etc.) are displayed
incorrectly in the links.
"Université de Montréal Herbier Marie-Victorin (MT)" becomes
"Université de Montréal Herbier Marie-Victorin (MT)"

I can fix this by changing my browser's default character encoding -
Western (ISO-8859-1) - to Unicode (UTF-8), but I guess not a lot of
users know this. (This is for Firefox and Safari, I didn't check the
default character encoding on Internet Explorer)

I'm not an expert on this, but would there be a way of translating the
special characters to ISO Latin-1 codes or HTML Entities (é to é
or é) right before you generate the output? I guess for the
BCILinks-webservice, this would make sense, since the output will be
displayed on a HTML-page? Ideally the programmer would be able toggle
this service on or off, something like: <body onload="BCILinks.isocode
= true; BCILinks.parseLinks()">

Cheers,

Peter

Hilmar Lapp

unread,
Nov 13, 2008, 3:52:01 PM11/13/08
to BiodiversityCo...@googlegroups.com
Shouldn't the character encoding be part of the document header? Is
the character encoding set correctly in the header to utf-8 yet the
browser doesn't recognize this?

-hilmar

Peter Desmet

unread,
Nov 13, 2008, 5:15:36 PM11/13/08
to BiodiversityCo...@googlegroups.com
Yep, that fixed the problem. Thanks!

On Thu, Nov 13, 2008 at 3:52 PM, Hilmar Lapp <hl...@nescent.org> wrote:
>
> Shouldn't the character encoding be part of the document header? Is
> the character encoding set correctly in the header to utf-8 yet the
> browser doesn't recognize this?
>
> -hilmar
>
> On Nov 13, 2008, at 2:16 PM, Peter Desmet wrote:
>
>>
>> Hi,
>>
>> This is a really nice service! One suggestion though:
>>
>> Collection names with special characters (é, à, etc.) are displayed
>> incorrectly in the links.
>> "Université de Montréal Herbier Marie-Victorin (MT)" becomes
>> "UniversitÃ(c) de MontrÃ(c)al Herbier Marie-Victorin (MT)"
--
Peter Desmet
Biodiversity Informatics Manager / Directeur de l'informatique de la
biodiversité
Montréal Biodiversity Centre / Centre sur la biodiversité de Montréal

Institut de recherche en biologie végétale
Université de Montréal
4101, rue Sherbrooke est
Montréal, Québec, H1X 2B2
Canada

Télé / Phone: 514-872-5249
Télécopie / Fax: 514-872-9406
Email: peter.de...@gmail.com
Reply all
Reply to author
Forward
0 new messages