StripAccentMarksFromString
Strip accent marks (diacritics) from a given string. For example: "Niño שָׁלוֹם Montréal اَلسَّلَامُ عَلَيْكُمْ" Will return: "Nino שלום Montreal السلام عليكم".
python · Community Common Scripts
Details
| ID | StripAccentMarksFromString |
|---|---|
| Language | python |
| From Version | 6.0.0 |
| Docker Image | demisto/python3:3.12.13.11879924 |
| Tags | transformer string |
README
Strip accent marks (diacritics) from a given string.
For example: “Niño שָׁלוֹם Montréal اَلسَّلَامُ عَلَيْكُمْ”
Will return: “Nino שלום Montreal السلام عليكم”
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | transformer, string |
Inputs
| Argument Name | Description |
|---|---|
| value |
Outputs
There are no outputs for this script.
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 import unicodedata string = demisto.args()["value"] normalized = unicodedata.normalize("NFKD", string) res = "" for character in normalized: if not unicodedata.combining(character): res += character demisto.results(res)