Pages

Friday 12 August 2022

DOI addresses with brackets

Recently I got sent a DOI (document object identifier - read more here) by a student with a set of brackets in the URL, which then refused to work.

I ended up doing a search for the ASCII (American Standard Code For Information Interchange - read more here) characters, then a search for URL encoding/rendering of ASCII characters for the open bracket symbol and the close bracket. The use of some symbols in URLs can stop the link working appropriately. Apparently the creator has to create a redirect link so that it is read/rendered properly. And sometimes they don't do that. So we get a link which doesn't work. However, we can hack our own. I replaced the brackets with the code, and the DOI then worked perfectly.

The codes for the bracket symbols are:

Open bracket ( = %28

Close bracket ) = %29

An DOI example is (which may work, depending on whether the journal has created a redirect):

https://doi.org/10.1016/0360-3016(84)90054-3

Once replaced with the symbols, the DOI is (and works):

https://doi.org/10.1016/0360-3016%2884%2990054-3

And just FYI, following are some other common codes:

Space = %20

Question Mark ? = %3f

Colon : = %3a

Semicolon ; = %3b

Forward Slash / = %2f

Back Slash / = %5c

As this is likely to be a problem that I will encounter again, from time to time, I figured that a post would be helpful!


Sam

No comments :

Post a Comment

Thanks for your feedback. The elves will post it shortly.