I have a list of items in Persian and I want to sort them in alphabetical order.
As I understood java does not support sorting in Persian alphabetical correctly.
My code:
List<String> items = new ArrayList<>();
items.add("آب");
items.add("بابا");
items.add("تار");
items.add("پارک");
items.add("توت");
Collections.sort(items);
When I print this list the result will be:
آب
بابا
تار
توت
پارک
But it must be like this:
آب
بابا
پارک
تار
توت
The problem is with these letters گ چ پ ژ
How can I fix it?