mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-05-23 06:55:23 +00:00
9 lines
250 B
Python
9 lines
250 B
Python
from __future__ import annotations
|
|
|
|
import unicodedata
|
|
|
|
|
|
def ascii_fold(text: str) -> str:
|
|
"""Normalize unicode text to ASCII equivalents for search consistency."""
|
|
return unicodedata.normalize("NFD", text).encode("ascii", "ignore").decode()
|