I have a tree map that I want to sort on the key. Works fine as long as you use english. When you get into other languages that have accents the sort does not work correctly. In
java script there is a call you can use for a more natural search called localeCompare.
Is there a way in java to make a TreeMap have a more natural search?
sortedMap returns btest, ctest, ztest in the correct order. Now if you add a character like optList.put("ét", "1") to the hashmap ét and run it through the tree map it always returns it at the end of the list instead of between ctest & ztest key.
Can a TreeMap do a natural sort that will understand that order of the keys returned should be btest, ctest, ét, ztest?
Thanks