Revert "Search on server with ISO8859"

This reverts commit fd190fdee1.
pull/199/head
M66B 4 years ago
parent fd190fdee1
commit 9d35629b36

@ -42,7 +42,6 @@ import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.lang.reflect.Constructor;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.StandardCharsets;
import java.text.Normalizer;
import java.util.ArrayList;
@ -733,15 +732,8 @@ public class BoundaryCallbackMessages extends PagedList.BoundaryCallback<TupleMe
.replace("ß", "ss") // Eszett
.replace("ij", "ij");
search = Normalizer
.normalize(search, Normalizer.Form.NFKD);
CharsetEncoder encoder = StandardCharsets.ISO_8859_1.newEncoder();
StringBuilder sb = new StringBuilder();
for (int i = 0; i < search.length(); i++) {
char c = search.charAt(i);
sb.append(encoder.canEncode(c) ? c : '?');
}
search = sb.toString();
.normalize(search, Normalizer.Form.NFKD)
.replaceAll("[^\\p{ASCII}]", "");
}
List<String> word = new ArrayList<>();

Loading…
Cancel
Save