Commit 0dcf099
committed
Search with accent did not return existing result #4638
When a search was done in a localized field it did not always return
results even though they existed in DB. This is because localized
field use JSON to store data in DB and default behavior of Doctrine
is to escape unicode characters. That means a "é" would end up as
"\u00e9". If the search was only "é" that would still correctly matches,
but if the search had a prefix (or suffix) such as "sé", then it would
incorrectly not match.
To fix this, we override Doctrine behavior and always store unescaped
unicode characters. This makes the search straightforward and easier
to work with raw data in DB.1 parent f5c1ee5 commit 0dcf099
File tree
2 files changed
+17
-2
lines changed- src/DBAL/Types
- tests/DBAL/Types
2 files changed
+17
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
57 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
58 | 62 | | |
59 | 63 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
54 | 65 | | |
0 commit comments