This commit is contained in:
Alexander Sytnyk 2017-07-13 18:16:37 +03:00
parent 93c56ac9cc
commit 22266857c0

View file

@ -17,6 +17,7 @@ import net.osmand.util.MapUtils;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.io.RandomAccessFile; import java.io.RandomAccessFile;
import java.text.Collator;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
@ -664,9 +665,11 @@ public class OsmandRegions {
} }
} }
Comparator<WorldRegion> nameComparator = new Comparator<WorldRegion>() { Comparator<WorldRegion> nameComparator = new Comparator<WorldRegion>() {
final Collator collator = Collator.getInstance();
@Override @Override
public int compare(WorldRegion w1, WorldRegion w2) { public int compare(WorldRegion w1, WorldRegion w2) {
return w1.getLocaleName().compareTo(w2.getLocaleName()); return collator.compare(w1.getLocaleName(), w2.getLocaleName());
} }
}; };
sortSubregions(world, nameComparator); sortSubregions(world, nameComparator);