Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/237#discussion_r111237018
--- Diff: jena-arq/src/main/java/org/apache/jena/sparql/expr/NodeValue.java
---
@@ -784,10 +786,15 @@ private static int compare(NodeValue nv1, NodeValue
nv2, boolean sortOrderingCom
return x ;
}
- // same lang tag (case insensitive)
- x = StrUtils.strCompare(node1.getLiteralLexicalForm(),
node2.getLiteralLexicalForm()) ;
+ // same lang tag, handle collation
+ // TBD: cache locales? cache collators? pre define
both/any? a simple in-memory lru-map-cache?
+ Locale desiredLocale =
Locale.forLanguageTag(node1.getLiteralLanguage());
+ Collator collator = Collator.getInstance(desiredLocale);
--- End diff --
Or would we want to collate all literals with the same lang tag together
and for those with a lang-specific collator available, subsort according
thereto?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---