Edit of asset "Unicode Normalizer" Accepted

Old/Current New/Edit
Title Unicode Normalizer Unicode Normalizer
Description Tookit to handle removing diacritics and substitutable characters from unicode strings.

Provides a UnicodeNormalizer singleton that helps normalize your unicode strings by :

- removing diacritics (decomposing, then keeping only the first character)
- substituting fallback characters
- being blazingly fast (binary search)
- being lightweight
- being extensible

Its replacement database is built from the official unicode.org data. It is only about 16Kio.

Usage Example :

You can use the `normalize` method on the autoload singleton `UnicodeNormalizer`:

UnicodeNormalizer.normalize("Dès Noël, où un zéphyr haï me vêt")
# "Des Noel, ou un zephyr hai me vet"

You can also exclude some characters from the normalization by removing the from the mapping :

var allowed_decomposables := "éàè"
for i in allowed_decomposables.length():
UnicodeNormalizer.mapping.remove_decomposable(allowed_decomposables.unicode_at(i))

Finally, the UnicodeNormalizer is made to be extended, in order to adapt to specific needs.
Tookit to handle removing diacritics and substitutable characters from unicode strings.

Provides a UnicodeNormalizer singleton that helps normalize your unicode strings by :

- removing diacritics (decomposing, then keeping only the first character)
- substituting fallback characters
- being blazingly fast (binary search)
- being lightweight
- being extensible

Its replacement database is built from the official unicode.org data. It is only about 16Kio.

Usage Example :

You can use the `normalize` method on the autoload singleton `UnicodeNormalizer`:

UnicodeNormalizer.normalize("Dès Noël, où un zéphyr haï me vêt")
# "Des Noel, ou un zephyr hai me vet"

You can also exclude some characters from the normalization by removing the from the mapping :

var allowed_decomposables := "éàè"
for i in allowed_decomposables.length():
UnicodeNormalizer.mapping.remove_decomposable(allowed_decomposables.unicode_at(i))

Finally, the UnicodeNormalizer is made to be extended, in order to adapt to specific needs.
Category Scripts Scripts
License MIT MIT
Repository Provider GitHub GitHub
Repository Url https://github.com/Goutte/godot-addon-unicode-normalizer https://github.com/Goutte/godot-addon-unicode-normalizer
Issues Url https://github.com/Goutte/godot-addon-unicode-normalizer/issues https://github.com/Goutte/godot-addon-unicode-normalizer/issues
Godot version Godot 4.0 Godot 4.0
Version String 0.1.2 0.1.2
Download Commit f3b3a10c3583d1d5c5de05f3d4c69aef367fce08 f3b3a10c3583d1d5c5de05f3d4c69aef367fce08
Download Url (Computed) https://github.com/Goutte/godot-addon-unicode-normalizer/archive/f3b3a10c3583d1d5c5de05f3d4c69aef367fce08.zip https://github.com/Goutte/godot-addon-unicode-normalizer/archive/f3b3a10c3583d1d5c5de05f3d4c69aef367fce08.zip
Icon Url https://raw.githubusercontent.com/Goutte/godot-addon-unicode-normalizer/main/addons/goutte.unicode/extra/icon.png
https://raw.githubusercontent.com/Goutte/godot-addon-unicode-normalizer/main/addons/goutte.unicode/extra/icon.png
Preview Insert
Type image
Image/Video URL https://raw.githubusercontent.com/Goutte/godot-addon-unicode-normalizer/main/addons/goutte.unicode/extra/screenshot_01.png
Thumbnail