RIO normalizeLanguage shouldn't lowercase the tag

Description

RIO converts the languageTag toLowerCase: see
https://bitbucket.org/openrdf/sesame/src/7796198d63fb3b43fb21c6c79eba06701e9914a2/core/rio/languages/src/main/java/org/openrdf/rio/languages/RFC3066LanguageHandler.java?at=master
org.openrdf.rio.languages.RFC3066LanguageHandler::normalizeLanguage

While RFC 5646 = BCP 47 (which obsoletes RFC 3066) demands that tags should be treated case-insensitively, it also recommends: "consistent formatting and presentation of language tags will aid users. The format of subtags in the registry is RECOMMENDED as the form to use in language tags. This format generally corresponds to the common conventions for the various ISO standards from which the subtags are derived." (and the format is NOT all lowercase).
The RFC describes a case normalization algorithm: "An implementation can reproduce this format without accessing the registry as follows...".

I posted a similar request for RDF::Trine::Node::Literal, and implemented such normalization algorithm there (in Perl):
https://rt.cpan.org/Public/Bug/Display.html?id=88964
Gregg Williams (the author of RDF::Trine) agreed this normalization is better than lowercasing.

(Not sure which is the correct component: this is in the commno part of RIO)

Environment

None

Assignee

Jeen Broekstra

Reporter

Vladimir Alexiev

Labels

None

Components

Affects versions

Priority

Major
Configure