support diacritics symbols also with czech language

Search without diacritics will work properly in Czech Republic, Slovakia or Romania only when phone UI is set to these languages.

This is temporary solution.This should be handled better.
This commit is contained in:
David Heidelberg 2016-02-19 13:38:02 +01:00
parent 6499acd065
commit 04d8e09f2a

View file

@ -7,6 +7,7 @@ public class OsmAndCollator {
public static net.osmand.Collator primaryCollator() {
// romanian locale encounters diacritics as differnet symbols
final java.text.Collator instance = Locale.getDefault().getLanguage().equals("ro") ||
Locale.getDefault().getLanguage().equals("cs") ||
Locale.getDefault().getLanguage().equals("sk")? java.text.Collator.getInstance(Locale.US)
: java.text.Collator.getInstance();
instance.setStrength(java.text.Collator.PRIMARY);