Fixed the inconsistent behavior for accents in search#8640
Conversation
|
I just noticed that we have a method stripAccents in our StringUtil class org.jabref.model.strings; |
koppor
left a comment
There was a problem hiding this comment.
Please add test cases to https://github.com/JabRef/jabref/blob/main/src/test/java/org/jabref/model/strings/StringUtilTest.java to check whether stripAccents works.
Note that this method calls https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html#stripAccents-java.lang.String-, which should be similar to the one of the JDK
| // convert the given string to ASCII string | ||
| static String convertToASCII(String string) { | ||
| String normalizedString = Normalizer.normalize(string, Normalizer.Form.NFD); | ||
| return normalizedString.replaceAll("[^\\p{ASCII}]", ""); | ||
| } |
There was a problem hiding this comment.
Similar to @Siedlerchr's comment: Move such helper method to StringUtils.
There is IMHO need to convert SearchRule from an interface to a class.
There was a problem hiding this comment.
I created the tests in the StringUtilsTest class and changed the SearchRule back to interface.
| - We fixed an issue where opening the changelog from withing JabRef led to a 404 error [#8563](https://github.com/JabRef/jabref/issues/8563) | ||
| - We fixed an issue where not all found unlinked local files were imported correctly due to some race condition. [#8444](https://github.com/JabRef/jabref/issues/8444) | ||
| - We fixed an issue where Merge entries dialog exceeds screen boundaries. | ||
| - We fixed an issue where accent search does not perform consistently. [#6815]([https://github.com/JabRef/jabref/issues/6815]) |
There was a problem hiding this comment.
Please use correct markdown syntax
| - We fixed an issue where accent search does not perform consistently. [#6815]([https://github.com/JabRef/jabref/issues/6815]) | |
| - We fixed an issue where accent search does not perform consistently. [#6815](https://github.com/JabRef/jabref/issues/6815) |
There was a problem hiding this comment.
I deleted the "[]". Thanks!
|
Proposal for continuing: Start from the |
Thanks! I will use the stripAccents method. |
d13b681 to
cc4a9f2
Compare
Thanks for the info. I reset the branch and added the changes to the current main. |
|
Thanks for the follow up! LGTM! |
Currently, the characters with accents are not fully supported in the search functionality as described in #6815. This PR aims to solve it.
CHANGELOG.mddescribed in a way that is understandable for the average user (if applicable)