I am looking for a deterministic way of sorting a list of strings.
Sorting a string of course often leads to the suggestion to use String.localeCompare. But the order must be deterministic, unrelated to the computer where it is running on.
The hardcore solution I came up with is hashing each string and compare these instead with a locale option en
. Is there an easier solution?
The strings can be English, German, Chinese, Japanese, ...