curvenote / doi-utils

A toolkit to for handling DOI(Digital Object Identifier)
MIT License
2 stars 0 forks source link

Normalize DOIs to lower case #14

Open fwkoch opened 4 months ago

fwkoch commented 4 months ago

From the DOI handbook

Although from a character encoding viewpoint suffixes are case sensitive, for example 10.123/ABC is different from 10.123/AbC and the two could be distinguished as different identifiers, the DOI Foundation decided to remove case sensitivity, after a detailed review of the consequences

For that reason, I thing normalize should return the .toLowerCase version of the DOI. Maybe it's just that simple, assuming there's no issues with special characters?

fwkoch commented 4 months ago

Discussing with @rowanc1 - the other factor here is how authors want to present their DOIs. Even if they are technically case-insensitive, we may not want to lose the original case. Maybe that means we do not normalize to lower case, and in applications where DOI strings are compared, there must be an additional toLowerCase outside of doi.normalize. Alternatively, we could provide an option to the normalize function, but that may be unnecessary complexity here.